1 /* Script for ld -Ur: link w/out relocation, do create constructors */ 2 OUTPUT_FORMAT("elf32-ntradbigmips", "elf32-ntradbigmips", 3 "elf32-ntradlittlemips") 4 OUTPUT_ARCH(mips) 5 /* For some reason, the Solaris linker makes bad executables 6 if gld -r is used and the intermediate file has sections starting 7 at non-zero addresses. Could be a Solaris ld bug, could be a GNU ld 8 bug. But for now assigning the zero vmas works. */ 9 SECTIONS 10 { 11 /* Read-only sections, merged into text segment: */ 12 .interp 0 : { *(.interp) } 13 .MIPS.abiflags 0 : { *(.MIPS.abiflags) } 14 .reginfo 0 : { *(.reginfo) } 15 .note.gnu.build-id : { *(.note.gnu.build-id) } 16 .dynamic 0 : { *(.dynamic) } 17 .hash 0 : { *(.hash) } 18 .gnu.hash 0 : { *(.gnu.hash) } 19 .dynsym 0 : { *(.dynsym) } 20 .dynstr 0 : { *(.dynstr) } 21 .gnu.version 0 : { *(.gnu.version) } 22 .gnu.version_d 0: { *(.gnu.version_d) } 23 .gnu.version_r 0: { *(.gnu.version_r) } 24 .rel.init 0 : { *(.rel.init) } 25 .rela.init 0 : { *(.rela.init) } 26 .rel.text 0 : { *(.rel.text) } 27 .rela.text 0 : { *(.rela.text) } 28 .rel.fini 0 : { *(.rel.fini) } 29 .rela.fini 0 : { *(.rela.fini) } 30 .rel.rodata 0 : { *(.rel.rodata) } 31 .rela.rodata 0 : { *(.rela.rodata) } 32 .rel.data.rel.ro 0 : { *(.rel.data.rel.ro) } 33 .rela.data.rel.ro 0 : { *(.rela.data.rel.ro) } 34 .rel.data 0 : { *(.rel.data) } 35 .rela.data 0 : { *(.rela.data) } 36 .rel.tdata 0 : { *(.rel.tdata) } 37 .rela.tdata 0 : { *(.rela.tdata) } 38 .rel.tbss 0 : { *(.rel.tbss) } 39 .rela.tbss 0 : { *(.rela.tbss) } 40 .rel.ctors 0 : { *(.rel.ctors) } 41 .rela.ctors 0 : { *(.rela.ctors) } 42 .rel.dtors 0 : { *(.rel.dtors) } 43 .rela.dtors 0 : { *(.rela.dtors) } 44 .rel.got 0 : { *(.rel.got) } 45 .rela.got 0 : { *(.rela.got) } 46 .rel.dyn 0 : { *(.rel.dyn) } 47 .rel.sdata 0 : { *(.rel.sdata) } 48 .rela.sdata 0 : { *(.rela.sdata) } 49 .rel.sbss 0 : { *(.rel.sbss) } 50 .rela.sbss 0 : { *(.rela.sbss) } 51 .rel.sdata2 0 : { *(.rel.sdata2) } 52 .rela.sdata2 0 : { *(.rela.sdata2) } 53 .rel.sbss2 0 : { *(.rel.sbss2) } 54 .rela.sbss2 0 : { *(.rela.sbss2) } 55 .rel.bss 0 : { *(.rel.bss) } 56 .rela.bss 0 : { *(.rela.bss) } 57 .rel.iplt 0 : 58 { 59 *(.rel.iplt) 60 } 61 .rela.iplt 0 : 62 { 63 *(.rela.iplt) 64 } 65 .rel.plt 0 : 66 { 67 *(.rel.plt) 68 } 69 .rela.plt 0 : 70 { 71 *(.rela.plt) 72 } 73 .init 0 : 74 { 75 KEEP (*(SORT_NONE(.init))) 76 } 77 .plt 0 : { *(.plt) } 78 .iplt 0 : { *(.iplt) } 79 .text 0 : 80 { 81 *(.text .stub) 82 /* .gnu.warning sections are handled specially by elf32.em. */ 83 *(.gnu.warning) 84 } 85 .fini 0 : 86 { 87 KEEP (*(SORT_NONE(.fini))) 88 } 89 .rodata 0 : { *(.rodata) } 90 .rodata1 0 : { *(.rodata1) } 91 .sdata2 0 : 92 { 93 *(.sdata2) 94 } 95 .sbss2 0 : { *(.sbss2) } 96 .eh_frame_hdr : { *(.eh_frame_hdr) } 97 .eh_frame 0 : ONLY_IF_RO { KEEP (*(.eh_frame)) } 98 .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table 99 .gcc_except_table.*) } 100 /* These sections are generated by the Sun/Oracle C++ compiler. */ 101 .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges 102 .exception_ranges*) } 103 /* Adjust the address for the data segment. For 32 bits we want to align 104 at exactly a page boundary to make life easier for apriori. */ 105 /* Exception handling */ 106 .eh_frame 0 : ONLY_IF_RW { KEEP (*(.eh_frame)) } 107 .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } 108 .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) } 109 /* Thread Local Storage sections */ 110 .tdata 0 : { *(.tdata) } 111 .tbss 0 : { *(.tbss) } 112 /* Ensure the __preinit_array_start label is properly aligned. We 113 could instead move the label definition inside the section, but 114 the linker would then create the section even if it turns out to 115 be empty, which isn't pretty. */ 116 . = ALIGN(32 / 8); 117 .preinit_array 0 : 118 { 119 KEEP (*(.preinit_array)) 120 } 121 .jcr 0 : { KEEP (*(.jcr)) } 122 .data 0 : 123 { 124 *(.data) 125 SORT(CONSTRUCTORS) 126 } 127 .data1 0 : { *(.data1) } 128 .got.plt 0 : { *(.got.plt) } 129 .got 0 : { *(.got) } 130 /* We want the small data sections together, so single-instruction offsets 131 can access them all, and initialized data all before uninitialized, so 132 we can shorten the on-disk segment size. */ 133 .sdata 0 : 134 { 135 *(.sdata) 136 } 137 .lit8 0 : { *(.lit8) } 138 .lit4 0 : { *(.lit4) } 139 .srdata 0 : { *(.srdata) } 140 .sbss 0 : 141 { 142 *(.dynsbss) 143 *(.sbss) 144 *(.scommon) 145 } 146 .bss 0 : 147 { 148 *(.dynbss) 149 *(.bss) 150 *(COMMON) 151 /* Align here to ensure that the .bss section occupies space up to 152 _end. Align after .bss to ensure correct alignment even if the 153 .bss section disappears because there are no input sections. */ 154 } 155 /* Stabs debugging sections. */ 156 .stab 0 : { *(.stab) } 157 .stabstr 0 : { *(.stabstr) } 158 .stab.excl 0 : { *(.stab.excl) } 159 .stab.exclstr 0 : { *(.stab.exclstr) } 160 .stab.index 0 : { *(.stab.index) } 161 .stab.indexstr 0 : { *(.stab.indexstr) } 162 .comment 0 : { *(.comment) } 163 /* DWARF debug sections. 164 Symbols in the DWARF debugging sections are relative to the beginning 165 of the section so we begin them at 0. */ 166 /* DWARF 1 */ 167 .debug 0 : { *(.debug) } 168 .line 0 : { *(.line) } 169 /* GNU DWARF 1 extensions */ 170 .debug_srcinfo 0 : { *(.debug_srcinfo) } 171 .debug_sfnames 0 : { *(.debug_sfnames) } 172 /* DWARF 1.1 and DWARF 2 */ 173 .debug_aranges 0 : { *(.debug_aranges) } 174 .debug_pubnames 0 : { *(.debug_pubnames) } 175 /* DWARF 2 */ 176 .debug_info 0 : { *(.debug_info) } 177 .debug_abbrev 0 : { *(.debug_abbrev) } 178 .debug_line 0 : { *(.debug_line .debug_line.* .debug_line_end ) } 179 .debug_frame 0 : { *(.debug_frame) } 180 .debug_str 0 : { *(.debug_str) } 181 .debug_loc 0 : { *(.debug_loc) } 182 .debug_macinfo 0 : { *(.debug_macinfo) } 183 /* SGI/MIPS DWARF 2 extensions */ 184 .debug_weaknames 0 : { *(.debug_weaknames) } 185 .debug_funcnames 0 : { *(.debug_funcnames) } 186 .debug_typenames 0 : { *(.debug_typenames) } 187 .debug_varnames 0 : { *(.debug_varnames) } 188 /* DWARF 3 */ 189 .debug_pubtypes 0 : { *(.debug_pubtypes) } 190 .debug_ranges 0 : { *(.debug_ranges) } 191 /* DWARF Extension. */ 192 .debug_macro 0 : { *(.debug_macro) } 193 .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) } 194 .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) } 195 .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) } 196 } 197