1 # Linker script for PE.
4 OUTPUT_FORMAT(${OUTPUT_FORMAT})
11 .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
13 ${RELOCATING+ *(.init)}
15 ${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
16 LONG (-1); *(.ctors); *(.ctor); LONG (0); }
17 ${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
18 LONG (-1); *(.dtors); *(.dtor); LONG (0); }
19 ${RELOCATING+ *(.fini)}
20 /* ??? Why is .gcc_exc here? */
21 ${RELOCATING+ *(.gcc_exc)}
22 ${RELOCATING+ etext = .;}
23 /* Grouped section support currently must be explicitly provided for
24 in the linker script. */
29 .bss BLOCK(__section_alignment__) :
36 .data BLOCK(__section_alignment__) :
42 /* Grouped section support currently must be explicitly provided for
43 in the linker script. */
47 .rdata BLOCK(__section_alignment__) :
50 /* Grouped section support currently must be explicitly provided for
51 in the linker script. */
55 .edata BLOCK(__section_alignment__) :
60 /DISCARD/ BLOCK(__section_alignment__) :
68 .idata BLOCK(__section_alignment__) :
70 /* This cannot currently be handled with grouped sections.
71 See pe.em:sort_sections. */
74 ${RELOCATING+ /* These zeroes mark the end of the import list. */}
75 ${RELOCATING+ LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);}
81 .CRT BLOCK(__section_alignment__) :
83 /* Grouped sections are used to handle .CRT\$foo. */
87 .endjunk BLOCK(__section_alignment__) :
89 /* end is deprecated, don't use it */
90 ${RELOCATING+ end = .;}
91 ${RELOCATING+ __end__ = .;}
94 .reloc BLOCK(__section_alignment__) :
99 .rsrc BLOCK(__section_alignment__) :
102 /* Grouped sections are used to handle .rsrc\$0[12]. */
106 .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
111 .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :