source: branches/win64/lisp-kernel/win64/pei-x86-64.x @ 8625

Last change on this file since 8625 was 8625, checked in by andreas, 13 years ago

Linker script to allocate memory at a fixed address.

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