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