1 # Linker script for PE.
2 # These are substituted in as variables in order to get '}' in a shell
3 # conditional expansion.
4 INIT='.init : { *(.init) }'
5 FINI='.fini : { *(.fini) }'
7 OUTPUT_FORMAT(${OUTPUT_FORMAT})
10 ENTRY(_mainCRTStartup)
15 .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
17 ${RELOCATING+ *(.init);}
19 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
20 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
21 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
22 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
23 ${RELOCATING+ *(.fini);}
24 ${RELOCATING+ *(.gcc_exc);}
25 ${RELOCATING+ etext = .};
28 .bss BLOCK(__section_alignment__) :
35 .data BLOCK(__section_alignment__) :
43 .rdata BLOCK(__section_alignment__) :
51 .edata BLOCK(__section_alignment__) : {
56 /DISCARD/ BLOCK(__section_alignment__) : {
64 .idata BLOCK(__section_alignment__) :
74 .CRT BLOCK(__section_alignment__) :
91 .rsrc BLOCK(__section_alignment__) :
98 .endjunk BLOCK(__section_alignment__) :
100 /* end is deprecated, don't use it */
101 ${RELOCATING+ end = .};
102 ${RELOCATING+ __end__ = .};
105 .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
110 .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
116 .reloc BLOCK(__section_alignment__) :