]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/ldscripts/ARCH-arm/main_dyn.ld
update
[l4.git] / l4 / pkg / ldscripts / ARCH-arm / main_dyn.ld
1 /* -*- Makefile -*- */
2 ENTRY(_start)
3
4 PHDRS
5 {
6   phdr PT_PHDR PHDRS;
7   interp PT_INTERP;
8   ro PT_LOAD FILEHDR PHDRS;
9   rw PT_LOAD;
10   dyn PT_DYNAMIC;
11   ehf PT_GNU_EH_FRAME;
12   L4_DEFINE_L4PHDRS
13 }
14
15
16 SECTIONS
17 {
18
19   /* Read-only sections, merged into text segment: */
20   PROVIDE (__executable_start = 0x00008000); . = 0x00008000 + SIZEOF_HEADERS;
21   .interp         : { *(.interp) } :ro :interp
22   .note.gnu.build-id : { *(.note.gnu.build-id) } :ro
23   .hash           : { *(.hash) }
24   .gnu.hash       : { *(.gnu.hash) }
25   .dynsym         : { *(.dynsym) }
26   .dynstr         : { *(.dynstr) }
27   .gnu.version    : { *(.gnu.version) }
28   .gnu.version_d  : { *(.gnu.version_d) }
29   .gnu.version_r  : { *(.gnu.version_r) }
30   .rel.init       : { *(.rel.init) }
31   .rela.init      : { *(.rela.init) }
32   .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
33   .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
34   .rel.fini       : { *(.rel.fini) }
35   .rela.fini      : { *(.rela.fini) }
36   .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
37   .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
38   .rel.data.rel.ro   : { *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*) }
39   .rela.data.rel.ro   : { *(.rela.data.rel.ro* .rela.gnu.linkonce.d.rel.ro.*) }
40   .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
41   .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
42   .rel.tdata      : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
43   .rela.tdata     : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
44   .rel.tbss       : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
45   .rela.tbss      : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
46   .rel.ctors      : { *(.rel.ctors) }
47   .rela.ctors     : { *(.rela.ctors) }
48   .rel.dtors      : { *(.rel.dtors) }
49   .rela.dtors     : { *(.rela.dtors) }
50   .rel.got        : { *(.rel.got) }
51   .rela.got       : { *(.rela.got) }
52   .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
53   .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
54   .rel.plt        : { *(.rel.plt) }
55   .rela.plt       : { *(.rela.plt) }
56   .init           :
57   {
58     KEEP (*(.init))
59   } =0
60   .plt            : { *(.plt) }
61   .text           :
62   {
63     *(.text .stub .text.* .gnu.linkonce.t.*)
64     KEEP (*(.text.*personality*))
65     /* .gnu.warning sections are handled specially by elf32.em.  */
66     *(.gnu.warning)
67     *(.glue_7t) *(.glue_7) *(.vfp11_veneer)
68   } =0
69   .fini           :
70   {
71     KEEP (*(.fini))
72   } =0
73   PROVIDE (__etext = .);
74   PROVIDE (_etext = .);
75   PROVIDE (etext = .);
76   .rol4re_elf_aux : {
77     KEEP (*(.rol4re_elf_aux))
78   } : ro : l4re_aux
79   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) } : ro
80   .rodata1        : { *(.rodata1) }
81   .ARM.extab      : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
82   __exidx_start = .;
83   .ARM.exidx      : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
84   __exidx_end = .;
85   .eh_frame_hdr   : { *(.eh_frame_hdr) } :ehf :ro
86   .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) } :ro
87   .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table .gcc_except_table.*) } :ro
88   /* Adjust the address for the data segment.  We want to adjust up to
89      the same address within the page on the next page up.  */
90   . = ALIGN (CONSTANT (MAXPAGESIZE)) - ((CONSTANT (MAXPAGESIZE) - .) & (CONSTANT (MAXPAGESIZE) - 1)); . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
91   PROVIDE (_sdata = .);
92   /* Exception handling  */
93   .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) } :rw
94   .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) } :rw
95   /* Thread Local Storage sections  */
96   .tdata          : { *(.tdata .tdata.* .gnu.linkonce.td.*) } :rw
97   .tbss           : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
98   .preinit_array     :
99   {
100     PROVIDE_HIDDEN (__preinit_array_start = .);
101     KEEP (*(.preinit_array))
102     PROVIDE_HIDDEN (__preinit_array_end = .);
103   }
104   .init_array     :
105   {
106      PROVIDE_HIDDEN (__init_array_start = .);
107      KEEP (*(SORT(.init_array.*)))
108      KEEP (*(.init_array))
109      PROVIDE_HIDDEN (__init_array_end = .);
110   }
111   .fini_array     :
112   {
113     PROVIDE_HIDDEN (__fini_array_start = .);
114     KEEP (*(.fini_array))
115     KEEP (*(SORT(.fini_array.*)))
116     PROVIDE_HIDDEN (__fini_array_end = .);
117   }
118   .ctors          :
119   {
120     /* gcc uses crtbegin.o to find the start of
121        the constructors, so we make sure it is
122        first.  Because this is a wildcard, it
123        doesn't matter if the user does not
124        actually link against crtbegin.o; the
125        linker won't look for a file to match a
126        wildcard.  The wildcard also means that it
127        doesn't matter which directory crtbegin.o
128        is in.  */
129     KEEP (*crtbegin.o(.ctors))
130     KEEP (*crtbegin?.o(.ctors))
131     /* We don't want to include the .ctor section from
132        the crtend.o file until after the sorted ctors.
133        The .ctor section from the crtend file contains the
134        end of ctors marker and it must be last */
135     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
136     KEEP (*(SORT(.ctors.*)))
137     KEEP (*(.ctors))
138   }
139   .dtors          :
140   {
141     KEEP (*crtbegin.o(.dtors))
142     KEEP (*crtbegin?.o(.dtors))
143     KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
144     KEEP (*(SORT(.dtors.*)))
145     KEEP (*(.dtors))
146   }
147   .jcr            : { KEEP (*(.jcr)) }
148   .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }
149   .dynamic        : { *(.dynamic) } :dyn :rw
150   . = DATA_SEGMENT_RELRO_END (0, .);
151   .got            : { *(.got.plt) *(.got) } :rw
152   .data           :
153   {
154     __data_start = . ;
155     *(.data .data.* .gnu.linkonce.d.*)
156     KEEP (*(.gnu.linkonce.d.*personality*))
157     SORT(CONSTRUCTORS)
158   } :rw
159   .data1          : { *(.data1) }
160   _edata = .; PROVIDE (edata = .);
161   __bss_start = .;
162   __bss_start__ = .;
163   .bss            :
164   {
165    *(.dynbss)
166    *(.bss .bss.* .gnu.linkonce.b.*)
167    *(COMMON)
168    /* Align here to ensure that the .bss section occupies space up to
169       _end.  Align after .bss to ensure correct alignment even if the
170       .bss section disappears because there are no input sections.
171       FIXME: Why do we need it? When there is no .bss section, we don't
172       pad the .data section.  */
173    . = ALIGN(. != 0 ? 32 / 8 : 1);
174   }
175   _bss_end__ = . ; __bss_end__ = . ;
176   . = ALIGN(32 / 8);
177   . = ALIGN(32 / 8);
178   __end__ = . ;
179   _end = .; PROVIDE (end = .);
180   . = DATA_SEGMENT_END (.);
181   /* Stabs debugging sections.  */
182   .stab          0 : { *(.stab) }
183   .stabstr       0 : { *(.stabstr) }
184   .stab.excl     0 : { *(.stab.excl) }
185   .stab.exclstr  0 : { *(.stab.exclstr) }
186   .stab.index    0 : { *(.stab.index) }
187   .stab.indexstr 0 : { *(.stab.indexstr) }
188   .comment       0 : { *(.comment) }
189   /* DWARF debug sections.
190      Symbols in the DWARF debugging sections are relative to the beginning
191      of the section so we begin them at 0.  */
192   /* DWARF 1 */
193   .debug          0 : { *(.debug) }
194   .line           0 : { *(.line) }
195   /* GNU DWARF 1 extensions */
196   .debug_srcinfo  0 : { *(.debug_srcinfo) }
197   .debug_sfnames  0 : { *(.debug_sfnames) }
198   /* DWARF 1.1 and DWARF 2 */
199   .debug_aranges  0 : { *(.debug_aranges) }
200   .debug_pubnames 0 : { *(.debug_pubnames) }
201   /* DWARF 2 */
202   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
203   .debug_abbrev   0 : { *(.debug_abbrev) }
204   .debug_line     0 : { *(.debug_line) }
205   .debug_frame    0 : { *(.debug_frame) }
206   .debug_str      0 : { *(.debug_str) }
207   .debug_loc      0 : { *(.debug_loc) }
208   .debug_macinfo  0 : { *(.debug_macinfo) }
209   /* SGI/MIPS DWARF 2 extensions */
210   .debug_weaknames 0 : { *(.debug_weaknames) }
211   .debug_funcnames 0 : { *(.debug_funcnames) }
212   .debug_typenames 0 : { *(.debug_typenames) }
213   .debug_varnames  0 : { *(.debug_varnames) }
214   /* DWARF 3 */
215   .debug_pubtypes 0 : { *(.debug_pubtypes) }
216   .debug_ranges   0 : { *(.debug_ranges) }
217   .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
218   .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
219   /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) }
220 }
221