* scripttempl/v850.sc (__gp, __ep): Define.
[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 23 ${RELOCATING+ *(.fini);}
0c1abe06 24 ${RELOCATING+ *(.gcc_exc);}
3f38a017
SC
25 ${RELOCATING+ etext = .};
26 }
27
d87e370b 28 .bss BLOCK(__section_alignment__) :
3f38a017 29 {
d87e370b
DE
30 __bss_start__ = . ;
31 *(.bss) ;
3f38a017 32 *(COMMON);
d87e370b
DE
33 __bss_end__ = . ;
34 }
35 .data BLOCK(__section_alignment__) :
36 {
37 __data_start__ = . ;
38 *(.data);
39 *(.data2);
40 __data_end__ = . ;
3f38a017
SC
41 }
42
d87e370b 43 .rdata BLOCK(__section_alignment__) :
3f38a017
SC
44 {
45 *(.rdata)
46 ;
47 }
d87e370b
DE
48
49
50
f2618f82 51 .edata BLOCK(__section_alignment__) : {
d87e370b
DE
52 *(.edata) ;
53 }
54
0c1abe06
SC
55
56 /DISCARD/ BLOCK(__section_alignment__) : {
d87e370b
DE
57 *(.debug\$S)
58 *(.debug\$T)
59 *(.debug\$F)
60 *(.drectve)
3f38a017
SC
61 ;
62 }
d87e370b
DE
63
64 .idata BLOCK(__section_alignment__) :
3f38a017 65 {
de71eb77
SC
66 *(.idata\$2)
67 *(.idata\$3)
68 *(.idata\$4)
69 *(.idata\$5)
70 *(.idata\$6)
71 *(.idata\$7)
3f38a017
SC
72 ;
73 }
d87e370b 74 .CRT BLOCK(__section_alignment__) :
3f38a017 75 {
de71eb77
SC
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)
3f38a017
SC
89 ;
90 }
d87e370b 91 .rsrc BLOCK(__section_alignment__) :
3f38a017 92 {
de71eb77
SC
93 *(.rsrc\$01)
94 *(.rsrc\$02)
3f38a017
SC
95 ;
96 }
d87e370b
DE
97
98 .endjunk BLOCK(__section_alignment__) :
99 {
f2618f82 100 /* end is deprecated, don't use it */
d87e370b 101 ${RELOCATING+ end = .};
f2618f82 102 ${RELOCATING+ __end__ = .};
3f38a017 103 }
d87e370b
DE
104
105 .stab BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
3f38a017
SC
106 {
107 [ .stab ]
108 }
109
d87e370b 110 .stabstr BLOCK(__section_alignment__) ${RELOCATING+(NOLOAD)} :
3f38a017
SC
111 {
112 [ .stabstr ]
113 }
d87e370b
DE
114
115
116 .reloc BLOCK(__section_alignment__) :
117 {
118 *(.reloc)
119 ;
120 }
121
122
3f38a017
SC
123}
124EOF
This page took 0.067965 seconds and 4 git commands to generate.