1 # Linker script for PE.
3 if test -z "${RELOCATEABLE_OUTPUT_FORMAT}"; then
4 RELOCATEABLE_OUTPUT_FORMAT=${OUTPUT_FORMAT}
8 ${RELOCATING+OUTPUT_FORMAT(${OUTPUT_FORMAT})}
9 ${RELOCATING-OUTPUT_FORMAT(${RELOCATEABLE_OUTPUT_FORMAT})}
13 ENTRY(_mainCRTStartup)
17 .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
19 ${RELOCATING+ *(.init)}
21 ${RELOCATING+*(.text\$*)}
22 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
23 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
24 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
25 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
26 ${RELOCATING+ *(.fini)}
27 /* ??? Why is .gcc_exc here? */
28 ${RELOCATING+ *(.gcc_exc)}
29 ${RELOCATING+ etext = .;}
33 /* The Cygwin32 library uses a section to avoid copying certain data
34 on fork. This used to be named ".data$nocopy". The linker used
35 to include this between __data_start__ and __data_end__, but that
36 breaks building the cygwin32 dll. Instead, we name the section
37 ".data_cygwin_nocopy" and explictly include it after __data_end__. */
39 .data ${RELOCATING+BLOCK(__section_alignment__)} :
41 ${RELOCATING+__data_start__ = . ;}
44 ${RELOCATING+*(.data\$*)}
45 ${RELOCATING+__data_end__ = . ;}
46 ${RELOCATING+*(.data_cygwin_nocopy)}
49 .bss ${RELOCATING+BLOCK(__section_alignment__)} :
51 ${RELOCATING+__bss_start__ = . ;}
54 ${RELOCATING+__bss_end__ = . ;}
57 .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
60 ${RELOCATING+*(.rdata\$*)}
64 .edata ${RELOCATING+BLOCK(__section_alignment__)} :
77 .idata ${RELOCATING+BLOCK(__section_alignment__)} :
79 /* This cannot currently be handled with grouped sections.
80 See pe.em:sort_sections. */
81 ${RELOCATING+*(.idata\$2)}
82 ${RELOCATING+*(.idata\$3)}
83 ${RELOCATING+ /* These zeroes mark the end of the import list. */}
84 ${RELOCATING+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);}
85 ${RELOCATING+*(.idata\$4)}
86 ${RELOCATING+*(.idata\$5)}
87 ${RELOCATING+*(.idata\$6)}
88 ${RELOCATING+*(.idata\$7)}
90 .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
92 ${RELOCATING+*(.CRT\$*)}
95 .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
97 /* end is deprecated, don't use it */
98 ${RELOCATING+ end = .;}
99 ${RELOCATING+ __end__ = .;}
102 .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
107 .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
110 ${RELOCATING+*(.rsrc\$*)}
113 .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
118 .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :