[82d9087] | 1 | /* Default linker script, for normal executables */
|
---|
| 2 | /* Copyright (C) 2014-2018 Free Software Foundation, Inc.
|
---|
| 3 | Copying and distribution of this script, with or without modification,
|
---|
| 4 | are permitted in any medium without royalty provided the copyright
|
---|
| 5 | notice and this notice are preserved. */
|
---|
| 6 | OUTPUT_FORMAT("elf64-ia64-little", "elf64-ia64-little",
|
---|
| 7 | "elf64-ia64-little")
|
---|
| 8 | OUTPUT_ARCH(ia64)
|
---|
| 9 | ENTRY(_start)
|
---|
| 10 | SEARCH_DIR("=/lib");
|
---|
| 11 | SECTIONS
|
---|
| 12 | {
|
---|
| 13 | /* Read-only sections, merged into text segment: */
|
---|
| 14 | PROVIDE (__executable_start = SEGMENT_START("text-segment", 0x7FFF000000000000)); . = SEGMENT_START("text-segment", 0x7FFF000000000000) + SIZEOF_HEADERS;
|
---|
| 15 | .interp : { *(.interp) }
|
---|
| 16 | .note.gnu.build-id : { *(.note.gnu.build-id) }
|
---|
| 17 | .hash : { *(.hash) }
|
---|
| 18 | .gnu.hash : { *(.gnu.hash) }
|
---|
| 19 | .dynsym : { *(.dynsym) }
|
---|
| 20 | .dynstr : { *(.dynstr) }
|
---|
| 21 | .gnu.version : { *(.gnu.version) }
|
---|
| 22 | .gnu.version_d : { *(.gnu.version_d) }
|
---|
| 23 | .gnu.version_r : { *(.gnu.version_r) }
|
---|
| 24 | .rel.init : { *(.rel.init) }
|
---|
| 25 | .rela.init : { *(.rela.init) }
|
---|
| 26 | .rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
---|
| 27 | .rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
---|
| 28 | .rel.fini : { *(.rel.fini) }
|
---|
| 29 | .rela.fini : { *(.rela.fini) }
|
---|
| 30 | .rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
---|
| 31 | .rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
---|
| 32 | .rel.data.rel.ro : { *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*) }
|
---|
| 33 | .rela.data.rel.ro : { *(.rela.data.rel.ro .rela.data.rel.ro.* .rela.gnu.linkonce.d.rel.ro.*) }
|
---|
| 34 | .rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
---|
| 35 | .rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
---|
| 36 | .rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
---|
| 37 | .rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
---|
| 38 | .rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
---|
| 39 | .rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
---|
| 40 | .rel.ctors : { *(.rel.ctors) }
|
---|
| 41 | .rela.ctors : { *(.rela.ctors) }
|
---|
| 42 | .rel.dtors : { *(.rel.dtors) }
|
---|
| 43 | .rela.dtors : { *(.rela.dtors) }
|
---|
| 44 | .rel.got : { *(.rel.got) }
|
---|
| 45 | .rela.got : { *(.rela.got) }
|
---|
| 46 | .rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
|
---|
| 47 | .rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
|
---|
| 48 | .rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
|
---|
| 49 | .rela.sbss : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
|
---|
| 50 | .rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
|
---|
| 51 | .rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
|
---|
| 52 | .rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
|
---|
| 53 | .rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
|
---|
| 54 | .rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
---|
| 55 | .rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
---|
| 56 | .rel.iplt :
|
---|
| 57 | {
|
---|
| 58 | PROVIDE_HIDDEN (__rel_iplt_start = .);
|
---|
| 59 | *(.rel.iplt)
|
---|
| 60 | PROVIDE_HIDDEN (__rel_iplt_end = .);
|
---|
| 61 | }
|
---|
| 62 | .rela.iplt :
|
---|
| 63 | {
|
---|
| 64 | PROVIDE_HIDDEN (__rela_iplt_start = .);
|
---|
| 65 | *(.rela.iplt)
|
---|
| 66 | PROVIDE_HIDDEN (__rela_iplt_end = .);
|
---|
| 67 | }
|
---|
| 68 | .rel.plt :
|
---|
| 69 | {
|
---|
| 70 | *(.rel.plt)
|
---|
| 71 | }
|
---|
| 72 | .rela.plt :
|
---|
| 73 | {
|
---|
| 74 | *(.rela.plt)
|
---|
| 75 | }
|
---|
| 76 | .rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }
|
---|
| 77 | .init :
|
---|
| 78 | {
|
---|
| 79 | KEEP (*(SORT_NONE(.init)))
|
---|
| 80 | } =0x00300000010070000002000001000400
|
---|
| 81 | .plt : { *(.plt) }
|
---|
| 82 | .iplt : { *(.iplt) }
|
---|
| 83 | .text :
|
---|
| 84 | {
|
---|
| 85 | *(.text.unlikely .text.*_unlikely .text.unlikely.*)
|
---|
| 86 | *(.text.exit .text.exit.*)
|
---|
| 87 | *(.text.startup .text.startup.*)
|
---|
| 88 | *(.text.hot .text.hot.*)
|
---|
| 89 | *(.text .stub .text.* .gnu.linkonce.t.*)
|
---|
| 90 | /* .gnu.warning sections are handled specially by elf32.em. */
|
---|
| 91 | *(.gnu.warning)
|
---|
| 92 | } =0x00300000010070000002000001000400
|
---|
| 93 | .fini :
|
---|
| 94 | {
|
---|
| 95 | KEEP (*(SORT_NONE(.fini)))
|
---|
| 96 | } =0x00300000010070000002000001000400
|
---|
| 97 | PROVIDE (__etext = .);
|
---|
| 98 | PROVIDE (_etext = .);
|
---|
| 99 | PROVIDE (etext = .);
|
---|
| 100 | .rodata : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
|
---|
| 101 | .rodata1 : { *(.rodata1) }
|
---|
| 102 | .sdata2 :
|
---|
| 103 | {
|
---|
| 104 | *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
|
---|
| 105 | }
|
---|
| 106 | .sbss2 : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
|
---|
| 107 | .opd : { *(.opd) }
|
---|
| 108 | .IA_64.unwind_info : { *(.IA_64.unwind_info* .gnu.linkonce.ia64unwi.*) }
|
---|
| 109 | .IA_64.unwind : { *(.IA_64.unwind* .gnu.linkonce.ia64unw.*) }
|
---|
| 110 | .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
|
---|
| 111 | .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
|
---|
| 112 | .gcc_except_table : ONLY_IF_RO { *(.gcc_except_table
|
---|
| 113 | .gcc_except_table.*) }
|
---|
| 114 | .gnu_extab : ONLY_IF_RO { *(.gnu_extab*) }
|
---|
| 115 | /* These sections are generated by the Sun/Oracle C++ compiler. */
|
---|
| 116 | .exception_ranges : ONLY_IF_RO { *(.exception_ranges
|
---|
| 117 | .exception_ranges*) }
|
---|
| 118 | /* Adjust the address for the data segment. We want to adjust up to
|
---|
| 119 | the same address within the page on the next page up. */
|
---|
| 120 | . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
|
---|
| 121 | /* Exception handling */
|
---|
| 122 | .eh_frame : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
|
---|
| 123 | .gnu_extab : ONLY_IF_RW { *(.gnu_extab) }
|
---|
| 124 | .gcc_except_table : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
|
---|
| 125 | .exception_ranges : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
|
---|
| 126 | /* Thread Local Storage sections */
|
---|
| 127 | .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
---|
| 128 | .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
---|
| 129 | .preinit_array :
|
---|
| 130 | {
|
---|
| 131 | PROVIDE_HIDDEN (__preinit_array_start = .);
|
---|
| 132 | KEEP (*(.preinit_array))
|
---|
| 133 | PROVIDE_HIDDEN (__preinit_array_end = .);
|
---|
| 134 | }
|
---|
| 135 | .init_array :
|
---|
| 136 | {
|
---|
| 137 | PROVIDE_HIDDEN (__init_array_start = .);
|
---|
| 138 | KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
---|
| 139 | KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
|
---|
| 140 | PROVIDE_HIDDEN (__init_array_end = .);
|
---|
| 141 | }
|
---|
| 142 | .fini_array :
|
---|
| 143 | {
|
---|
| 144 | PROVIDE_HIDDEN (__fini_array_start = .);
|
---|
| 145 | KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
|
---|
| 146 | KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
|
---|
| 147 | PROVIDE_HIDDEN (__fini_array_end = .);
|
---|
| 148 | }
|
---|
| 149 | .jcr : { KEEP (*(.jcr)) }
|
---|
| 150 | .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
|
---|
| 151 | .dynamic : { *(.dynamic) }
|
---|
| 152 | .data :
|
---|
| 153 | {
|
---|
| 154 | *(.data .data.* .gnu.linkonce.d.*)
|
---|
| 155 | SORT(CONSTRUCTORS)
|
---|
| 156 | }
|
---|
| 157 | .data1 : { *(.data1) }
|
---|
| 158 | .ctors :
|
---|
| 159 | {
|
---|
| 160 | /* gcc uses crtbegin.o to find the start of
|
---|
| 161 | the constructors, so we make sure it is
|
---|
| 162 | first. Because this is a wildcard, it
|
---|
| 163 | doesn't matter if the user does not
|
---|
| 164 | actually link against crtbegin.o; the
|
---|
| 165 | linker won't look for a file to match a
|
---|
| 166 | wildcard. The wildcard also means that it
|
---|
| 167 | doesn't matter which directory crtbegin.o
|
---|
| 168 | is in. */
|
---|
| 169 | KEEP (*crtbegin.o(.ctors))
|
---|
| 170 | KEEP (*crtbegin?.o(.ctors))
|
---|
| 171 | /* We don't want to include the .ctor section from
|
---|
| 172 | the crtend.o file until after the sorted ctors.
|
---|
| 173 | The .ctor section from the crtend file contains the
|
---|
| 174 | end of ctors marker and it must be last */
|
---|
| 175 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
---|
| 176 | KEEP (*(SORT(.ctors.*)))
|
---|
| 177 | KEEP (*(.ctors))
|
---|
| 178 | }
|
---|
| 179 | .dtors :
|
---|
| 180 | {
|
---|
| 181 | KEEP (*crtbegin.o(.dtors))
|
---|
| 182 | KEEP (*crtbegin?.o(.dtors))
|
---|
| 183 | KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
---|
| 184 | KEEP (*(SORT(.dtors.*)))
|
---|
| 185 | KEEP (*(.dtors))
|
---|
| 186 | }
|
---|
| 187 | .got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
|
---|
| 188 | .IA_64.pltoff : { *(.IA_64.pltoff) }
|
---|
| 189 | /* We want the small data sections together, so single-instruction offsets
|
---|
| 190 | can access them all, and initialized data all before uninitialized, so
|
---|
| 191 | we can shorten the on-disk segment size. */
|
---|
| 192 | .sdata :
|
---|
| 193 | {
|
---|
| 194 | *(.sdata .sdata.* .gnu.linkonce.s.*)
|
---|
| 195 | }
|
---|
| 196 | _edata = .; PROVIDE (edata = .);
|
---|
| 197 | . = .;
|
---|
| 198 | __bss_start = .;
|
---|
| 199 | .sbss :
|
---|
| 200 | {
|
---|
| 201 | *(.dynsbss)
|
---|
| 202 | *(.sbss .sbss.* .gnu.linkonce.sb.*)
|
---|
| 203 | *(.scommon)
|
---|
| 204 | }
|
---|
| 205 | .bss :
|
---|
| 206 | {
|
---|
| 207 | *(.dynbss)
|
---|
| 208 | *(.bss .bss.* .gnu.linkonce.b.*)
|
---|
| 209 | *(COMMON)
|
---|
| 210 | /* Align here to ensure that the .bss section occupies space up to
|
---|
| 211 | _end. Align after .bss to ensure correct alignment even if the
|
---|
| 212 | .bss section disappears because there are no input sections.
|
---|
| 213 | FIXME: Why do we need it? When there is no .bss section, we don't
|
---|
| 214 | pad the .data section. */
|
---|
| 215 | . = ALIGN(. != 0 ? 64 / 8 : 1);
|
---|
| 216 | }
|
---|
| 217 | . = ALIGN(64 / 8);
|
---|
| 218 | . = SEGMENT_START("ldata-segment", .);
|
---|
| 219 | . = ALIGN(64 / 8);
|
---|
| 220 | _end = .; PROVIDE (end = .);
|
---|
| 221 | /* Stabs debugging sections. */
|
---|
| 222 | .stab 0 : { *(.stab) }
|
---|
| 223 | .stabstr 0 : { *(.stabstr) }
|
---|
| 224 | .stab.excl 0 : { *(.stab.excl) }
|
---|
| 225 | .stab.exclstr 0 : { *(.stab.exclstr) }
|
---|
| 226 | .stab.index 0 : { *(.stab.index) }
|
---|
| 227 | .stab.indexstr 0 : { *(.stab.indexstr) }
|
---|
| 228 | .comment 0 : { *(.comment) }
|
---|
| 229 | /* DWARF debug sections.
|
---|
| 230 | Symbols in the DWARF debugging sections are relative to the beginning
|
---|
| 231 | of the section so we begin them at 0. */
|
---|
| 232 | /* DWARF 1 */
|
---|
| 233 | .debug 0 : { *(.debug) }
|
---|
| 234 | .line 0 : { *(.line) }
|
---|
| 235 | /* GNU DWARF 1 extensions */
|
---|
| 236 | .debug_srcinfo 0 : { *(.debug_srcinfo) }
|
---|
| 237 | .debug_sfnames 0 : { *(.debug_sfnames) }
|
---|
| 238 | /* DWARF 1.1 and DWARF 2 */
|
---|
| 239 | .debug_aranges 0 : { *(.debug_aranges) }
|
---|
| 240 | .debug_pubnames 0 : { *(.debug_pubnames) }
|
---|
| 241 | /* DWARF 2 */
|
---|
| 242 | .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
|
---|
| 243 | .debug_abbrev 0 : { *(.debug_abbrev) }
|
---|
| 244 | .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) }
|
---|
| 245 | .debug_frame 0 : { *(.debug_frame) }
|
---|
| 246 | .debug_str 0 : { *(.debug_str) }
|
---|
| 247 | .debug_loc 0 : { *(.debug_loc) }
|
---|
| 248 | .debug_macinfo 0 : { *(.debug_macinfo) }
|
---|
| 249 | /* SGI/MIPS DWARF 2 extensions */
|
---|
| 250 | .debug_weaknames 0 : { *(.debug_weaknames) }
|
---|
| 251 | .debug_funcnames 0 : { *(.debug_funcnames) }
|
---|
| 252 | .debug_typenames 0 : { *(.debug_typenames) }
|
---|
| 253 | .debug_varnames 0 : { *(.debug_varnames) }
|
---|
| 254 | /* DWARF 3 */
|
---|
| 255 | .debug_pubtypes 0 : { *(.debug_pubtypes) }
|
---|
| 256 | .debug_ranges 0 : { *(.debug_ranges) }
|
---|
| 257 | /* DWARF Extension. */
|
---|
| 258 | .debug_macro 0 : { *(.debug_macro) }
|
---|
| 259 | .debug_addr 0 : { *(.debug_addr) }
|
---|
| 260 | .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
---|
| 261 | /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
---|
| 262 | }
|
---|
| 263 |
|
---|