| 1 | /* modified from /usr/i586-mingw32msvc/lib/ldscripts/i386pe.x */ |
| 2 | OUTPUT_FORMAT(pei-i386) |
| 3 | SEARCH_DIR("/usr/i586-mingw32msvc/lib"); |
| 4 | SECTIONS |
| 5 | { |
| 6 | /* Make the virtual address and file offset synced if the alignment is |
| 7 | lower than the target page size. */ |
| 8 | . = SIZEOF_HEADERS; |
| 9 | . = ALIGN(__section_alignment__); |
| 10 | .text __image_base__ + (__section_alignment__): |
| 11 | { |
| 12 | StarCraft.o(.text) |
| 13 | } |
| 14 | .rdata 0x4fe000: |
| 15 | { |
| 16 | StarCraft.o(_rdata) |
| 17 | } |
| 18 | .data 0x50c000: |
| 19 | { |
| 20 | StarCraft.o(.data) |
| 21 | } |
| 22 | .text2 BLOCK(__section_alignment__) : |
| 23 | { |
| 24 | *(.init) |
| 25 | *(.text) |
| 26 | *(SORT(.text$*)) |
| 27 | *(.text.*) |
| 28 | *(.glue_7t) |
| 29 | *(.glue_7) |
| 30 | ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; |
| 31 | LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); |
| 32 | ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; |
| 33 | LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); |
| 34 | *(.fini) |
| 35 | /* ??? Why is .gcc_exc here? */ |
| 36 | *(.gcc_exc) |
| 37 | PROVIDE (etext = .); |
| 38 | *(.gcc_except_table) |
| 39 | } |
| 40 | .rdata2 BLOCK(__section_alignment__) : |
| 41 | { |
| 42 | *(.rdata) |
| 43 | *(SORT(.rdata$*)) |
| 44 | ___RUNTIME_PSEUDO_RELOC_LIST__ = .; |
| 45 | __RUNTIME_PSEUDO_RELOC_LIST__ = .; |
| 46 | *(.rdata_runtime_pseudo_reloc) |
| 47 | ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .; |
| 48 | __RUNTIME_PSEUDO_RELOC_LIST_END__ = .; |
| 49 | } |
| 50 | /* The Cygwin32 library uses a section to avoid copying certain data |
| 51 | on fork. This used to be named ".data". The linker used |
| 52 | to include this between __data_start__ and __data_end__, but that |
| 53 | breaks building the cygwin32 dll. Instead, we name the section |
| 54 | ".data_cygwin_nocopy" and explictly include it after __data_end__. */ |
| 55 | .data2 BLOCK(__section_alignment__) : |
| 56 | { |
| 57 | __data_start__ = . ; |
| 58 | *(.data) |
| 59 | *(.data2) |
| 60 | *(SORT(.data$*)) |
| 61 | *(.jcr) |
| 62 | __data_end__ = . ; |
| 63 | *(.data_cygwin_nocopy) |
| 64 | } |
| 65 | .eh_frame BLOCK(__section_alignment__) : |
| 66 | { |
| 67 | *(.eh_frame) |
| 68 | } |
| 69 | .pdata BLOCK(__section_alignment__) : |
| 70 | { |
| 71 | *(.pdata) |
| 72 | } |
| 73 | .bss BLOCK(__section_alignment__) : |
| 74 | { |
| 75 | __bss_start__ = . ; |
| 76 | *(.bss) |
| 77 | *(COMMON) |
| 78 | __bss_end__ = . ; |
| 79 | } |
| 80 | .edata BLOCK(__section_alignment__) : |
| 81 | { |
| 82 | *(.edata) |
| 83 | } |
| 84 | /DISCARD/ : |
| 85 | { |
| 86 | *(.debug$S) |
| 87 | *(.debug$T) |
| 88 | *(.debug$F) |
| 89 | *(.drectve) |
| 90 | } |
| 91 | .idata BLOCK(__section_alignment__) : |
| 92 | { |
| 93 | /* This cannot currently be handled with grouped sections. |
| 94 | See pe.em:sort_sections. */ |
| 95 | SORT(*)(.idata$2) |
| 96 | SORT(*)(.idata$3) |
| 97 | /* These zeroes mark the end of the import list. */ |
| 98 | LONG (0); LONG (0); LONG (0); LONG (0); LONG (0); |
| 99 | SORT(*)(.idata$4) |
| 100 | SORT(*)(.idata$5) |
| 101 | SORT(*)(.idata$6) |
| 102 | SORT(*)(.idata$7) |
| 103 | } |
| 104 | .CRT BLOCK(__section_alignment__) : |
| 105 | { |
| 106 | ___crt_xc_start__ = . ; |
| 107 | *(SORT(.CRT$XC*)) /* C initialization */ |
| 108 | ___crt_xc_end__ = . ; |
| 109 | ___crt_xi_start__ = . ; |
| 110 | *(SORT(.CRT$XI*)) /* C++ initialization */ |
| 111 | ___crt_xi_end__ = . ; |
| 112 | ___crt_xl_start__ = . ; |
| 113 | *(SORT(.CRT$XL*)) /* TLS callbacks */ |
| 114 | /* ___crt_xl_end__ is defined in the TLS Directory support code */ |
| 115 | ___crt_xp_start__ = . ; |
| 116 | *(SORT(.CRT$XP*)) /* Pre-termination */ |
| 117 | ___crt_xp_end__ = . ; |
| 118 | ___crt_xt_start__ = . ; |
| 119 | *(SORT(.CRT$XT*)) /* Termination */ |
| 120 | ___crt_xt_end__ = . ; |
| 121 | } |
| 122 | .tls BLOCK(__section_alignment__) : |
| 123 | { |
| 124 | ___tls_start__ = . ; |
| 125 | *(.tls) |
| 126 | *(.tls$) |
| 127 | *(SORT(.tls$*)) |
| 128 | ___tls_end__ = . ; |
| 129 | } |
| 130 | .endjunk BLOCK(__section_alignment__) : |
| 131 | { |
| 132 | /* end is deprecated, don't use it */ |
| 133 | PROVIDE (end = .); |
| 134 | PROVIDE ( _end = .); |
| 135 | __end__ = .; |
| 136 | } |
| 137 | .rsrc BLOCK(__section_alignment__) : |
| 138 | { |
| 139 | *(.rsrc) |
| 140 | *(SORT(.rsrc$*)) |
| 141 | } |
| 142 | .reloc BLOCK(__section_alignment__) : |
| 143 | { |
| 144 | *(.reloc) |
| 145 | } |
| 146 | .stab BLOCK(__section_alignment__) (NOLOAD) : |
| 147 | { |
| 148 | *(.stab) |
| 149 | } |
| 150 | .stabstr BLOCK(__section_alignment__) (NOLOAD) : |
| 151 | { |
| 152 | *(.stabstr) |
| 153 | } |
| 154 | /* DWARF debug sections. |
| 155 | Symbols in the DWARF debugging sections are relative to the beginning |
| 156 | of the section. Unlike other targets that fake this by putting the |
| 157 | section VMA at 0, the PE format will not allow it. */ |
| 158 | /* DWARF 1.1 and DWARF 2. */ |
| 159 | .debug_aranges BLOCK(__section_alignment__) (NOLOAD) : |
| 160 | { |
| 161 | *(.debug_aranges) |
| 162 | } |
| 163 | .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) : |
| 164 | { |
| 165 | *(.debug_pubnames) |
| 166 | } |
| 167 | .debug_pubtypes BLOCK(__section_alignment__) (NOLOAD) : |
| 168 | { |
| 169 | *(.debug_pubtypes) |
| 170 | } |
| 171 | /* DWARF 2. */ |
| 172 | .debug_info BLOCK(__section_alignment__) (NOLOAD) : |
| 173 | { |
| 174 | *(.debug_info) *(.gnu.linkonce.wi.*) |
| 175 | } |
| 176 | .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) : |
| 177 | { |
| 178 | *(.debug_abbrev) |
| 179 | } |
| 180 | .debug_line BLOCK(__section_alignment__) (NOLOAD) : |
| 181 | { |
| 182 | *(.debug_line) |
| 183 | } |
| 184 | .debug_frame BLOCK(__section_alignment__) (NOLOAD) : |
| 185 | { |
| 186 | *(.debug_frame) |
| 187 | } |
| 188 | .debug_str BLOCK(__section_alignment__) (NOLOAD) : |
| 189 | { |
| 190 | *(.debug_str) |
| 191 | } |
| 192 | .debug_loc BLOCK(__section_alignment__) (NOLOAD) : |
| 193 | { |
| 194 | *(.debug_loc) |
| 195 | } |
| 196 | .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) : |
| 197 | { |
| 198 | *(.debug_macinfo) |
| 199 | } |
| 200 | /* SGI/MIPS DWARF 2 extensions. */ |
| 201 | .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) : |
| 202 | { |
| 203 | *(.debug_weaknames) |
| 204 | } |
| 205 | .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) : |
| 206 | { |
| 207 | *(.debug_funcnames) |
| 208 | } |
| 209 | .debug_typenames BLOCK(__section_alignment__) (NOLOAD) : |
| 210 | { |
| 211 | *(.debug_typenames) |
| 212 | } |
| 213 | .debug_varnames BLOCK(__section_alignment__) (NOLOAD) : |
| 214 | { |
| 215 | *(.debug_varnames) |
| 216 | } |
| 217 | /* DWARF 3. */ |
| 218 | .debug_ranges BLOCK(__section_alignment__) (NOLOAD) : |
| 219 | { |
| 220 | *(.debug_ranges) |
| 221 | } |
| 222 | } |