* scripttmpl/elfppc.sc (.sdata2, .sbss2): Implement Feb 2 change
[deliverable/binutils-gdb.git] / ld / scripttempl / pe.sc
CommitLineData
eb7f87c5 1# Linker script for PE.
3f38a017
SC
2# These are substituted in as variables in order to get '}' in a shell
3# conditional expansion.
4INIT='.init : { *(.init) }'
5FINI='.fini : { *(.fini) }'
6cat <<EOF
eb7f87c5 7OUTPUT_FORMAT(${OUTPUT_FORMAT})
3f38a017
SC
8${LIB_SEARCH_DIRS}
9
10ENTRY(_mainCRTStartup)
11
12SECTIONS
13{
14
d87e370b 15 .text ${RELOCATING+ __image_base__ + __section_alignment__ } :
3f38a017
SC
16 {
17 ${RELOCATING+ *(.init);}
18 *(.text)
d87e370b
DE
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); }
3f38a017
SC
23 ${RELOCATING+ *(.fini);}
24 ${RELOCATING+ etext = .};
25 }
26
d87e370b 27 .bss BLOCK(__section_alignment__) :
3f38a017 28 {
d87e370b
DE
29 __bss_start__ = . ;
30 *(.bss) ;
3f38a017 31 *(COMMON);
d87e370b
DE
32 __bss_end__ = . ;
33 }
34 .data BLOCK(__section_alignment__) :
35 {
36 __data_start__ = . ;
37 *(.data);
38 *(.data2);
39 __data_end__ = . ;
3f38a017
SC
40 }
41
d87e370b 42 .rdata BLOCK(__section_alignment__) :
3f38a017
SC
43 {
44 *(.rdata)
45 ;
46 }
d87e370b
DE
47
48
49
50 .edata BLOCK(__section_alignment__) : {
51 *(.edata) ;
52 }
53
781332fa 54 /* See coffcode.h. These are discarded. */
d87e370b
DE
55 .junk BLOCK(__section_alignment__) : {
56 *(.debug\$S)
57 *(.debug\$T)
58 *(.debug\$F)
59 *(.drectve)
3f38a017
SC
60 ;
61 }
d87e370b
DE
62
63 .idata BLOCK(__section_alignment__) :
3f38a017 64 {
de71eb77
SC
65 *(.idata\$2)
66 *(.idata\$3)
67 *(.idata\$4)
68 *(.idata\$5)
69 *(.idata\$6)
70 *(.idata\$7)
3f38a017
SC
71 ;
72 }
d87e370b 73 .CRT BLOCK(__section_alignment__) :
3f38a017 74 {
de71eb77
SC
75 *(.CRT\$XCA)
76 *(.CRT\$XCC)
77 *(.CRT\$XCZ)
78 *(.CRT\$XIA)
79 *(.CRT\$XIC)
80 *(.CRT\$XIZ)
81 *(.CRT\$XLA)
82 *(.CRT\$XLZ)
83 *(.CRT\$XPA)
84 *(.CRT\$XPX)
85 *(.CRT\$XPZ)
86 *(.CRT\$XTA)
87 *(.CRT\$XTZ)
3f38a017
SC
88 ;
89 }
d87e370b 90 .rsrc BLOCK(__section_alignment__) :
3f38a017 91 {
de71eb77
SC
92 *(.rsrc\$01)
93 *(.rsrc\$02)
3f38a017
SC
94 ;
95 }
d87e370b
DE
96
97 .endjunk BLOCK(__section_alignment__) :
98 {
99 ${RELOCATING+ end = .};
3f38a017 100 }
d87e370b
DE
101
102 .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
3f38a017
SC
103 {
104 [ .stab ]
105 }
106
d87e370b 107 .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
3f38a017
SC
108 {
109 [ .stabstr ]
110 }
d87e370b
DE
111
112
113 .reloc BLOCK(__section_alignment__) :
114 {
115 *(.reloc)
116 ;
117 }
118
119
3f38a017
SC
120}
121EOF
This page took 0.062801 seconds and 4 git commands to generate.