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