1/* 2 * Copyright (c) 2007, 2008, 2016, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. If 6 * you do not find this file, copies can be found by writing to: ETH Zurich 7 * D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10OUTPUT_FORMAT("elf64-littleaarch64") 11OUTPUT_ARCH("aarch64") 12 13ENTRY(start) 14 15PHDRS { 16 load PT_LOAD ; 17 dynamic PT_DYNAMIC ; 18} 19 20SECTIONS { 21 /* This is a relocatable executable, its actual link address is 22 * irrelevant. */ 23 . = 0x0; 24 25 .text : { *(.text); } :load 26 .rodata . : { *(.rodata); } 27 .data . : { *(.data); } 28 .bss . : { *(.bss); } 29 /* The linker also spits out a useless GOT and PLT, with nothing in 30 * them. Unfortunately, we can't discard them without the linker 31 * complaining about it. We just waste 32B, and forget about them. */ 32 .got . : { *(.got); } 33 .got.plt . : { *(.got.plt); } 34 .rela.dyn . : { *(.rela.dyn); } 35 36 .dynamic . : { *(.dynamic); } :load :dynamic 37 38 39 /* These sections get discarded */ 40 /DISCARD/ : 41 { 42 /* The interpreter section will ask for ld.so, which is wrong. */ 43 *(.interp); 44 45 /* The dynamic symbol table generated by the linker just has section 46 * addresses in it - we don't need it. */ 47 *(.dynsym); 48 *(.dynstr); 49 *(.hash); 50 *(.note.gnu.build-id); 51 } 52} 53