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