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 .data ${RELOCATING+BLOCK(__section_alignment__)} :
35 ${RELOCATING+__data_start__ = . ;}
38 ${RELOCATING+*(.data\$*)}
39 ${RELOCATING+__data_end__ = . ;}
40 ${RELOCATING+*(.data_cygwin_nocopy)}
43 .bss ${RELOCATING+BLOCK(__section_alignment__)} :
45 ${RELOCATING+__bss_start__ = . ;}
48 ${RELOCATING+__bss_end__ = . ;}
51 .rdata ${RELOCATING+BLOCK(__section_alignment__)} :
54 ${RELOCATING+*(.rdata\$*)}
58 .edata ${RELOCATING+BLOCK(__section_alignment__)} :
71 .idata ${RELOCATING+BLOCK(__section_alignment__)} :
73 /* This cannot currently be handled with grouped sections.
74 See pe.em:sort_sections. */
77 ${RELOCATING+ /* These zeroes mark the end of the import list. */}
78 ${RELOCATING+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);}
84 .CRT ${RELOCATING+BLOCK(__section_alignment__)} :
86 ${RELOCATING+*(.CRT\$*)}
89 .endjunk ${RELOCATING+BLOCK(__section_alignment__)} :
91 /* end is deprecated, don't use it */
92 ${RELOCATING+ end = .;}
93 ${RELOCATING+ __end__ = .;}
96 .reloc ${RELOCATING+BLOCK(__section_alignment__)} :
101 .rsrc ${RELOCATING+BLOCK(__section_alignment__)} :
104 ${RELOCATING+*(.rsrc\$*)}
107 .stab ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :
112 .stabstr ${RELOCATING+BLOCK(__section_alignment__)} ${RELOCATING+(NOLOAD)} :