1
# Linker script for PE.
3
if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
4
RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
7
# We can't easily and portably get an unquoted $ in a shell
8
# substitution, so we do this instead.
9
if test "${RELOCATING}"; then
16
/* These zeroes mark the end of the import list. */
17
LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
36
${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
37
${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
41
${RELOCATING+ENTRY (__start)}
42
${RELOCATING+header = .;}
43
${RELOCATING+__fltused = .; /* set up floating pt for MS .obj\'s */}
44
${RELOCATING+__ldused = .;}
47
.text ${RELOCATING+ __image_base__ + __section_alignment__ } :
49
${RELOCATING+ __text_start__ = . ;}
50
${RELOCATING+ *(.init)}
55
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
56
LONG (-1); *(.ctors); *(.ctor); LONG (0); }
57
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
58
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
59
${RELOCATING+ *(.fini)}
60
/* ??? Why is .gcc_exc here? */
61
${RELOCATING+ *(.gcc_exc)}
62
${RELOCATING+ etext = .;}
63
${RELOCATING+ __text_end__ = .;}
67
/* The Cygwin32 library uses a section to avoid copying certain data
68
on fork. This used to be named ".data$nocopy". The linker used
69
to include this between __data_start__ and __data_end__, but that
70
breaks building the cygwin32 dll. Instead, we name the section
71
".data_cygwin_nocopy" and explicitly include it after __data_end__. */
73
.data ${RELOCATING+BLOCK(__section_alignment__)} :
75
${RELOCATING+__data_start__ = . ;}
79
${RELOCATING+__data_end__ = . ;}
80
${RELOCATING+*(.data_cygwin_nocopy)}
83
.bss ${RELOCATING+BLOCK(__section_alignment__)} :
85
${RELOCATING+__bss_start__ = . ;}
88
/* link.exe apparently pulls in .obj's because of UNDEF common
89
symbols, which is not the coff way, but that's MS for you. */
94
${RELOCATING+__bss_end__ = . ;}
97
.rdata ${RELOCATING+BLOCK(__section_alignment__)} :
104
.edata ${RELOCATING+BLOCK(__section_alignment__)} :
118
.idata ${RELOCATING+BLOCK(__section_alignment__)} :
120
/* This cannot currently be handled with grouped sections.
121
See pe.em:sort_sections. */
124
.CRT ${RELOCATING+BLOCK(__section_alignment__)} :
129
.endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
131
/* end is deprecated, don't use it */
132
${RELOCATING+ end = .;}
133
${RELOCATING+ _end = .;}
134
${RELOCATING+ __end__ = .;}
137
.reloc ${RELOCATING+BLOCK(__section_alignment__)} :
142
.rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
148
.exc ${RELOCATING+BLOCK(__section_alignment__)} :
154
.stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
159
.stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
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. */
168
.debug 0 ${RELOCATING+(NOLOAD)} : { *(.debug) }
169
.line 0 ${RELOCATING+(NOLOAD)} : { *(.line) }
171
/* GNU DWARF 1 extensions */
172
.debug_srcinfo 0 ${RELOCATING+(NOLOAD)} : { *(.debug_srcinfo) }
173
.debug_sfnames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_sfnames) }
175
/* DWARF 1.1 and DWARF 2 */
176
.debug_aranges 0 ${RELOCATING+(NOLOAD)} : { *(.debug_aranges) }
177
.debug_pubnames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_pubnames) }
180
.debug_info 0 ${RELOCATING+(NOLOAD)} : { *(.debug_info) *(.gnu.linkonce.wi.*) }
181
.debug_abbrev 0 ${RELOCATING+(NOLOAD)} : { *(.debug_abbrev) }
182
.debug_line 0 ${RELOCATING+(NOLOAD)} : { *(.debug_line) }
183
.debug_frame 0 ${RELOCATING+(NOLOAD)} : { *(.debug_frame) }
184
.debug_str 0 ${RELOCATING+(NOLOAD)} : { *(.debug_str) }
185
.debug_loc 0 ${RELOCATING+(NOLOAD)} : { *(.debug_loc) }
186
.debug_macinfo 0 ${RELOCATING+(NOLOAD)} : { *(.debug_macinfo) }
188
/* SGI/MIPS DWARF 2 extensions */
189
.debug_weaknames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_weaknames) }
190
.debug_funcnames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_funcnames) }
191
.debug_typenames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_typenames) }
192
.debug_varnames 0 ${RELOCATING+(NOLOAD)} : { *(.debug_varnames) }