1OUTPUT_FORMAT("elf64-ia64-little") 2OUTPUT_ARCH(ia64) 3ENTRY(_start_plabel) 4SECTIONS 5{ 6 . = 0; 7 ImageBase = .; 8 /* .hash and/or .gnu.hash MUST come first! */ 9 .hash : { *(.hash) } 10 .gnu.hash : { *(.gnu.hash) } 11 .eh_frame : { *(.eh_frame) } 12 .gcc_except_table : { *(.gcc_except_table*) } 13 . = ALIGN(4096); 14 .text : 15 { 16 _text = .; 17 *(.text) 18 *(.text.*) 19 *(.gnu.linkonce.t.*) 20 . = ALIGN(16); 21 } 22 _etext = .; 23 _text_size = . - _text; 24 . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE)); 25 __gp = ALIGN (8) + 0x200000; 26 .sdata : 27 { 28 _data = .; 29 *(.got.plt) 30 *(.got) 31 *(.srodata) 32 *(.sdata) 33 *(.sbss) 34 *(.scommon) 35 } 36 . = ALIGN(4096); 37 .data : 38 { 39 *(.rodata*) 40 *(.ctors) 41 *(.data*) 42 *(.gnu.linkonce.d*) 43 *(.plabel) /* data whose relocs we want to ignore */ 44 45 /* 46 * Note that these aren't the using the GNU "CONSTRUCTOR" output section 47 * command, so they don't start with a size. Because of p2align and the 48 * end/END definitions, and the fact that they're mergeable, they can also 49 * have NULLs which aren't guaranteed to be at the end. 50 */ 51 . = ALIGN(16); 52 _init_array = .; 53 *(SORT(.init_array.*)) 54 *(.init_array) 55 _init_array_end = .; 56 __CTOR_LIST__ = .; 57 *(SORT(.ctors.*)) 58 *(.ctors) 59 __CTOR_END__ = .; 60 __DTOR_LIST__ = .; 61 *(SORT(.dtors.*)) 62 *(.dtors) 63 __DTOR_END__ = .; 64 _fini_array = .; 65 *(SORT(.fini_array.*)) 66 *(.fini_array) 67 _fini_array_end = .; 68 69 /* the EFI loader doesn't seem to like a .bss section, so we stick 70 it all into .data: */ 71 *(.dynbss) 72 *(.bss*) 73 *(COMMON) 74 } 75 .note.gnu.build-id : { *(.note.gnu.build-id) } 76 77 . = ALIGN(4096); 78 .dynamic : { *(.dynamic) } 79 . = ALIGN(4096); 80 .rela : 81 { 82 *(.rela.text*) 83 *(.rela.sdata*) 84 *(.rela.data*) 85 *(.rela.got) 86 *(.rela.dyn) 87 *(.rela.gnu.linkonce.d*) 88 *(.rela.stab) 89 *(.rela.init_array*) 90 *(.rela.fini_array*) 91 *(.rela.ctors*) 92 *(.rela.dtors*) 93 } 94 . = ALIGN(4096); 95 .rela.plt : { *(.rela.plt) } 96 _edata = .; 97 _data_size = . - _etext; 98 . = ALIGN(4096); 99 .reloc : /* This is the PECOFF .reloc section! */ 100 { 101 KEEP (*(.reloc)) 102 } 103 . = ALIGN(4096); 104 .dynsym : { *(.dynsym) } 105 . = ALIGN(4096); 106 .dynstr : { *(.dynstr) } 107 . = DATA_SEGMENT_END (.); 108 /DISCARD/ : 109 { 110 *(.rela.plabel) 111 *(.rela.reloc) 112 *(.IA_64.unwind*) 113 *(.IA64.unwind*) 114 } 115} 116