1/* Script for ld -Ur: link w/out relocation, do create constructors */ 2/* Copyright (C) 2014 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. */ 6OUTPUT_FORMAT(pe-i386) 7SECTIONS 8{ 9 .text : 10 { 11 *(.text) 12 *(.glue_7t) 13 *(.glue_7) 14 ___CTOR_LIST__ = .; __CTOR_LIST__ = . ; 15 LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*)); LONG (0); 16 ___DTOR_LIST__ = .; __DTOR_LIST__ = . ; 17 LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*)); LONG (0); 18 /* ??? Why is .gcc_exc here? */ 19 } 20 /* The Cygwin32 library uses a section to avoid copying certain data 21 on fork. This used to be named ".data". The linker used 22 to include this between __data_start__ and __data_end__, but that 23 breaks building the cygwin32 dll. Instead, we name the section 24 ".data_cygwin_nocopy" and explicitly include it after __data_end__. */ 25 .data : 26 { 27 *(.data) 28 *(.data2) 29 *(.jcr) 30 } 31 .rdata : 32 { 33 *(.rdata) 34 *(.rdata_runtime_pseudo_reloc) 35 } 36 .eh_frame : 37 { 38 *(.eh_frame*) 39 } 40 .pdata : 41 { 42 *(.pdata) 43 } 44 .bss : 45 { 46 *(.bss) 47 *(COMMON) 48 } 49 .edata : 50 { 51 *(.edata) 52 } 53 /DISCARD/ : 54 { 55 *(.debug$S) 56 *(.debug$T) 57 *(.debug$F) 58 *(.drectve) 59 } 60 .idata : 61 { 62 /* This cannot currently be handled with grouped sections. 63 See pe.em:sort_sections. */ 64 } 65 .CRT : 66 { 67 /* ___crt_xl_end__ is defined in the TLS Directory support code */ 68 } 69 /* Windows TLS expects .tls$AAA to be at the start and .tls$ZZZ to be 70 at the end of section. This is important because _tls_start MUST 71 be at the beginning of the section to enable SECREL32 relocations with TLS 72 data. */ 73 .tls : 74 { 75 } 76 .endjunk : 77 { 78 /* end is deprecated, don't use it */ 79 } 80 .rsrc : SUBALIGN(4) 81 { 82 *(.rsrc) 83 } 84 .reloc : 85 { 86 *(.reloc) 87 } 88 .stab : 89 { 90 *(.stab) 91 } 92 .stabstr : 93 { 94 *(.stabstr) 95 } 96 /* DWARF debug sections. 97 Symbols in the DWARF debugging sections are relative to the beginning 98 of the section. Unlike other targets that fake this by putting the 99 section VMA at 0, the PE format will not allow it. */ 100 /* DWARF 1.1 and DWARF 2. */ 101 .debug_aranges : 102 { 103 *(.debug_aranges) 104 } 105 .zdebug_aranges : 106 { 107 *(.zdebug_aranges) 108 } 109 .debug_pubnames : 110 { 111 *(.debug_pubnames) 112 } 113 .zdebug_pubnames : 114 { 115 *(.zdebug_pubnames) 116 } 117 .debug_pubtypes : 118 { 119 *(.debug_pubtypes) 120 } 121 .zdebug_pubtypes : 122 { 123 *(.zdebug_pubtypes) 124 } 125 /* DWARF 2. */ 126 .debug_info : 127 { 128 *(.debug_info) 129 } 130 .zdebug_info : 131 { 132 *(.zdebug_info) 133 } 134 .debug_abbrev : 135 { 136 *(.debug_abbrev) 137 } 138 .zdebug_abbrev : 139 { 140 *(.zdebug_abbrev) 141 } 142 .debug_line : 143 { 144 *(.debug_line) 145 } 146 .zdebug_line : 147 { 148 *(.zdebug_line) 149 } 150 .debug_frame : 151 { 152 *(.debug_frame*) 153 } 154 .zdebug_frame : 155 { 156 *(.zdebug_frame*) 157 } 158 .debug_str : 159 { 160 *(.debug_str) 161 } 162 .zdebug_str : 163 { 164 *(.zdebug_str) 165 } 166 .debug_loc : 167 { 168 *(.debug_loc) 169 } 170 .zdebug_loc : 171 { 172 *(.zdebug_loc) 173 } 174 .debug_macinfo : 175 { 176 *(.debug_macinfo) 177 } 178 .zdebug_macinfo : 179 { 180 *(.zdebug_macinfo) 181 } 182 /* SGI/MIPS DWARF 2 extensions. */ 183 .debug_weaknames : 184 { 185 *(.debug_weaknames) 186 } 187 .zdebug_weaknames : 188 { 189 *(.zdebug_weaknames) 190 } 191 .debug_funcnames : 192 { 193 *(.debug_funcnames) 194 } 195 .zdebug_funcnames : 196 { 197 *(.zdebug_funcnames) 198 } 199 .debug_typenames : 200 { 201 *(.debug_typenames) 202 } 203 .zdebug_typenames : 204 { 205 *(.zdebug_typenames) 206 } 207 .debug_varnames : 208 { 209 *(.debug_varnames) 210 } 211 .zdebug_varnames : 212 { 213 *(.zdebug_varnames) 214 } 215 .debug_macro : 216 { 217 *(.debug_macro) 218 } 219 .zdebug_macro : 220 { 221 *(.zdebug_macro) 222 } 223 /* DWARF 3. */ 224 .debug_ranges : 225 { 226 *(.debug_ranges) 227 } 228 .zdebug_ranges : 229 { 230 *(.zdebug_ranges) 231 } 232 /* DWARF 4. */ 233 .debug_types : 234 { 235 *(.debug_types) 236 } 237 .zdebug_types : 238 { 239 *(.zdebug_types) 240 } 241} 242