* scripttempl/{ppcpe.sc, pe.sc} (.junk): Remove and use /DISCARD/.
[deliverable/binutils-gdb.git] / ld / scripttempl / pe.sc
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) }'
6 cat <<EOF
7 OUTPUT_FORMAT(${OUTPUT_FORMAT})
8 ${LIB_SEARCH_DIRS}
9
10 ENTRY(_mainCRTStartup)
11
12 SECTIONS
13 {
14
15 .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
16 {
17 ${RELOCATING+ *(.init);}
18 *(.text)
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 = .};
26 }
27
28 .bss BLOCK(__section_alignment__) :
29 {
30 __bss_start__ = . ;
31 *(.bss) ;
32 *(COMMON);
33 __bss_end__ = . ;
34 }
35 .data BLOCK(__section_alignment__) :
36 {
37 __data_start__ = . ;
38 *(.data);
39 *(.data2);
40 __data_end__ = . ;
41 }
42
43 .rdata BLOCK(__section_alignment__) :
44 {
45 *(.rdata)
46 ;
47 }
48
49
50
51 .edata BLOCK(__section_alignment__) : {
52 *(.edata) ;
53 }
54
55
56 /DISCARD/ BLOCK(__section_alignment__) : {
57 *(.debug\$S)
58 *(.debug\$T)
59 *(.debug\$F)
60 *(.drectve)
61 ;
62 }
63
64 .idata BLOCK(__section_alignment__) :
65 {
66 *(.idata\$2)
67 *(.idata\$3)
68 *(.idata\$4)
69 *(.idata\$5)
70 *(.idata\$6)
71 *(.idata\$7)
72 ;
73 }
74 .CRT BLOCK(__section_alignment__) :
75 {
76 *(.CRT\$XCA)
77 *(.CRT\$XCC)
78 *(.CRT\$XCZ)
79 *(.CRT\$XIA)
80 *(.CRT\$XIC)
81 *(.CRT\$XIZ)
82 *(.CRT\$XLA)
83 *(.CRT\$XLZ)
84 *(.CRT\$XPA)
85 *(.CRT\$XPX)
86 *(.CRT\$XPZ)
87 *(.CRT\$XTA)
88 *(.CRT\$XTZ)
89 ;
90 }
91 .rsrc BLOCK(__section_alignment__) :
92 {
93 *(.rsrc\$01)
94 *(.rsrc\$02)
95 ;
96 }
97
98 .endjunk BLOCK(__section_alignment__) :
99 {
100 ${RELOCATING+ end = .};
101 }
102
103 .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
104 {
105 [ .stab ]
106 }
107
108 .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
109 {
110 [ .stabstr ]
111 }
112
113
114 .reloc BLOCK(__section_alignment__) :
115 {
116 *(.reloc)
117 ;
118 }
119
120
121 }
122 EOF
This page took 0.034518 seconds and 5 git commands to generate.