Install binutils-2.19.1-mingw32-bin.tar.gz
[git/jnareb-git.git] / mingw / mingw32 / lib / ldscripts / i386pe.xbn
blobff772bfd47976165489060dda5768e3d23f22710
1 /* Script for -N: mix text and data on same page; don't align data */
2 OUTPUT_FORMAT(pei-i386)
3 SEARCH_DIR("/usr/local/mingw32/lib"); SEARCH_DIR("/usr/local/lib"); SEARCH_DIR("/lib"); SEARCH_DIR("/usr/lib");
4 SECTIONS
6   /* Make the virtual address and file offset synced if the alignment is
7      lower than the target page size. */
8   . = SIZEOF_HEADERS;
9   . = ALIGN(__section_alignment__);
10   .text  __image_base__ + ( __section_alignment__ < 0x1000 ? . : __section_alignment__ ) :
11   {
12      *(.init)
13     *(.text)
14     *(SORT(.text$*))
15     *(.glue_7t)
16     *(.glue_7)
17      ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
18                         LONG (-1);*(.ctors); *(.ctor); *(SORT(.ctors.*));  LONG (0);
19      ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
20                         LONG (-1); *(.dtors); *(.dtor); *(SORT(.dtors.*));  LONG (0);
21      *(.fini)
22     /* ??? Why is .gcc_exc here?  */
23      *(.gcc_exc)
24     PROVIDE (etext = .);
25      *(.gcc_except_table)
26   }
27   /* The Cygwin32 library uses a section to avoid copying certain data
28      on fork.  This used to be named ".data".  The linker used
29      to include this between __data_start__ and __data_end__, but that
30      breaks building the cygwin32 dll.  Instead, we name the section
31      ".data_cygwin_nocopy" and explictly include it after __data_end__. */
32   .data BLOCK(__section_alignment__) :
33   {
34     __data_start__ = . ;
35     *(.data)
36     *(.data2)
37     *(SORT(.data$*))
38     *(.jcr)
39     __data_end__ = . ;
40     *(.data_cygwin_nocopy)
41   }
42   .rdata BLOCK(__section_alignment__) :
43   {
44     *(.rdata)
45              *(SORT(.rdata$*))
46      *(.eh_frame)
47     ___RUNTIME_PSEUDO_RELOC_LIST__ = .;
48     __RUNTIME_PSEUDO_RELOC_LIST__ = .;
49     *(.rdata_runtime_pseudo_reloc)
50     ___RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
51     __RUNTIME_PSEUDO_RELOC_LIST_END__ = .;
52   }
53   .pdata BLOCK(__section_alignment__) :
54   {
55     *(.pdata)
56   }
57   .bss BLOCK(__section_alignment__) :
58   {
59     __bss_start__ = . ;
60     *(.bss)
61     *(COMMON)
62     __bss_end__ = . ;
63   }
64   .edata BLOCK(__section_alignment__) :
65   {
66     *(.edata)
67   }
68   /DISCARD/ :
69   {
70     *(.debug$S)
71     *(.debug$T)
72     *(.debug$F)
73     *(.drectve)
74   }
75   .idata BLOCK(__section_alignment__) :
76   {
77     /* This cannot currently be handled with grouped sections.
78         See pe.em:sort_sections.  */
79     SORT(*)(.idata$2)
80     SORT(*)(.idata$3)
81     /* These zeroes mark the end of the import list.  */
82     LONG (0); LONG (0); LONG (0); LONG (0); LONG (0);
83     SORT(*)(.idata$4)
84     SORT(*)(.idata$5)
85     SORT(*)(.idata$6)
86     SORT(*)(.idata$7)
87   }
88   .CRT BLOCK(__section_alignment__) :
89   {
90     ___crt_xc_start__ = . ;
91     *(SORT(.CRT$XC*))  /* C initialization */
92     ___crt_xc_end__ = . ;
93     ___crt_xi_start__ = . ;
94     *(SORT(.CRT$XI*))  /* C++ initialization */
95     ___crt_xi_end__ = . ;
96     ___crt_xl_start__ = . ;
97     *(SORT(.CRT$XL*))  /* TLS callbacks */
98     /* ___crt_xl_end__ is defined in the TLS Directory support code */
99     ___crt_xp_start__ = . ;
100     *(SORT(.CRT$XP*))  /* Pre-termination */
101     ___crt_xp_end__ = . ;
102     ___crt_xt_start__ = . ;
103     *(SORT(.CRT$XT*))  /* Termination */
104     ___crt_xt_end__ = . ;
105   }
106   .tls BLOCK(__section_alignment__) :
107   {
108     ___tls_start__ = . ;
109     *(.tls)
110     *(.tls$)
111     *(SORT(.tls$*))
112     ___tls_end__ = . ;
113   }
114   .endjunk BLOCK(__section_alignment__) :
115   {
116     /* end is deprecated, don't use it */
117     PROVIDE (end = .);
118     PROVIDE ( _end = .);
119      __end__ = .;
120   }
121   .rsrc BLOCK(__section_alignment__) :
122   {
123     *(.rsrc)
124     *(SORT(.rsrc$*))
125   }
126   .reloc BLOCK(__section_alignment__) :
127   {
128     *(.reloc)
129   }
130   .stab BLOCK(__section_alignment__) (NOLOAD) :
131   {
132     *(.stab)
133   }
134   .stabstr BLOCK(__section_alignment__) (NOLOAD) :
135   {
136     *(.stabstr)
137   }
138   /* DWARF debug sections.
139      Symbols in the DWARF debugging sections are relative to the beginning
140      of the section.  Unlike other targets that fake this by putting the
141      section VMA at 0, the PE format will not allow it.  */
142   /* DWARF 1.1 and DWARF 2.  */
143   .debug_aranges BLOCK(__section_alignment__) (NOLOAD) :
144   {
145     *(.debug_aranges)
146   }
147   .debug_pubnames BLOCK(__section_alignment__) (NOLOAD) :
148   {
149     *(.debug_pubnames)
150   }
151   /* DWARF 2.  */
152   .debug_info BLOCK(__section_alignment__) (NOLOAD) :
153   {
154     *(.debug_info) *(.gnu.linkonce.wi.*)
155   }
156   .debug_abbrev BLOCK(__section_alignment__) (NOLOAD) :
157   {
158     *(.debug_abbrev)
159   }
160   .debug_line BLOCK(__section_alignment__) (NOLOAD) :
161   {
162     *(.debug_line)
163   }
164   .debug_frame BLOCK(__section_alignment__) (NOLOAD) :
165   {
166     *(.debug_frame)
167   }
168   .debug_str BLOCK(__section_alignment__) (NOLOAD) :
169   {
170     *(.debug_str)
171   }
172   .debug_loc BLOCK(__section_alignment__) (NOLOAD) :
173   {
174     *(.debug_loc)
175   }
176   .debug_macinfo BLOCK(__section_alignment__) (NOLOAD) :
177   {
178     *(.debug_macinfo)
179   }
180   /* SGI/MIPS DWARF 2 extensions.  */
181   .debug_weaknames BLOCK(__section_alignment__) (NOLOAD) :
182   {
183     *(.debug_weaknames)
184   }
185   .debug_funcnames BLOCK(__section_alignment__) (NOLOAD) :
186   {
187     *(.debug_funcnames)
188   }
189   .debug_typenames BLOCK(__section_alignment__) (NOLOAD) :
190   {
191     *(.debug_typenames)
192   }
193   .debug_varnames BLOCK(__section_alignment__) (NOLOAD) :
194   {
195     *(.debug_varnames)
196   }
197   /* DWARF 3.  */
198   .debug_ranges BLOCK(__section_alignment__) (NOLOAD) :
199   {
200     *(.debug_ranges)
201   }