1/* Script for -Ur */
2/* Copyright (C) 2014-2021 Free Software Foundation, Inc.
3   Copying and distribution of this script, with or without modification,
4   are permitted in any medium without royalty provided the copyright
5   notice and this notice are preserved.  */
6OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
7	      "elf32-littlearm")
8OUTPUT_ARCH(arm)
9 /* For some reason, the Solaris linker makes bad executables
10  if gld -r is used and the intermediate file has sections starting
11  at non-zero addresses.  Could be a Solaris ld bug, could be a GNU ld
12  bug.  But for now assigning the zero vmas works.  */
13SECTIONS
14{
15  .interp       0 : { *(.interp) }
16  .note.gnu.build-id 0: { *(.note.gnu.build-id) }
17  .hash         0 : { *(.hash) }
18  .gnu.hash     0 : { *(.gnu.hash) }
19  .dynsym       0 : { *(.dynsym) }
20  .dynstr       0 : { *(.dynstr) }
21  .gnu.version  0 : { *(.gnu.version) }
22  .gnu.version_d 0: { *(.gnu.version_d) }
23  .gnu.version_r 0: { *(.gnu.version_r) }
24  .rel.init     0 : { *(.rel.init) }
25  .rela.init    0 : { *(.rela.init) }
26  .rel.text     0 : { *(.rel.text) }
27  .rela.text    0 : { *(.rela.text) }
28  .rel.fini     0 : { *(.rel.fini) }
29  .rela.fini    0 : { *(.rela.fini) }
30  .rel.rodata   0 : { *(.rel.rodata) }
31  .rela.rodata  0 : { *(.rela.rodata) }
32  .rel.data.rel.ro 0 : { *(.rel.data.rel.ro) }
33  .rela.data.rel.ro 0 : { *(.rela.data.rel.ro) }
34  .rel.data     0 : { *(.rel.data) }
35  .rela.data    0 : { *(.rela.data) }
36  .rel.tdata	0 : { *(.rel.tdata) }
37  .rela.tdata	0 : { *(.rela.tdata) }
38  .rel.tbss	0 : { *(.rel.tbss) }
39  .rela.tbss	0 : { *(.rela.tbss) }
40  .rel.ctors    0 : { *(.rel.ctors) }
41  .rela.ctors   0 : { *(.rela.ctors) }
42  .rel.dtors    0 : { *(.rel.dtors) }
43  .rela.dtors   0 : { *(.rela.dtors) }
44  .rel.got      0 : { *(.rel.got) }
45  .rela.got     0 : { *(.rela.got) }
46  .rel.bss      0 : { *(.rel.bss) }
47  .rela.bss     0 : { *(.rela.bss) }
48  .rel.iplt     0 :
49    {
50      *(.rel.iplt)
51    }
52  .rela.iplt    0 :
53    {
54      *(.rela.iplt)
55    }
56  .rel.plt      0 :
57    {
58      *(.rel.plt)
59    }
60  .rela.plt     0 :
61    {
62      *(.rela.plt)
63    }
64  .init         0 :
65  {
66    KEEP (*(SORT_NONE(.init)))
67  }
68  .plt          0 : { *(.plt) }
69  .iplt         0 : { *(.iplt) }
70  .text         0 :
71  {
72    *(.text .stub)
73    /* .gnu.warning sections are handled specially by elf.em.  */
74    *(.gnu.warning)
75  }
76  .fini         0 :
77  {
78    KEEP (*(SORT_NONE(.fini)))
79  }
80  .rodata       0 : { *(.rodata) }
81  .rodata1      0 : { *(.rodata1) }
82  .ARM.extab 0 : { *(.ARM.extab) }
83  .ARM.exidx 0 :
84    {
85      *(.ARM.exidx)
86    }
87  .eh_frame_hdr 0 : { *(.eh_frame_hdr) }
88  .eh_frame     0 : ONLY_IF_RO { KEEP (*(.eh_frame)) }
89  .gcc_except_table 0 : ONLY_IF_RO { *(.gcc_except_table) }
90  .gnu_extab 0 : ONLY_IF_RO { *(.gnu_extab*) }
91  /* These sections are generated by the Sun/Oracle C++ compiler.  */
92  .exception_ranges 0 : ONLY_IF_RO { *(.exception_ranges) }
93  /* Exception handling  */
94  .eh_frame     0 : ONLY_IF_RW { KEEP (*(.eh_frame)) }
95  .gnu_extab    0 : ONLY_IF_RW { *(.gnu_extab) }
96  .gcc_except_table 0 : ONLY_IF_RW { *(.gcc_except_table) }
97  .exception_ranges 0 : ONLY_IF_RW { *(.exception_ranges) }
98  /* Thread Local Storage sections  */
99  .tdata	0 :
100   {
101     *(.tdata)
102   }
103  .tbss		0 : { *(.tbss) }
104  .jcr          0 : { KEEP (*(.jcr)) }
105  .dynamic      0 : { *(.dynamic) }
106  .got          0 : { *(.got) }
107  .data         0 :
108  {
109    *(.data)
110    SORT(CONSTRUCTORS)
111  }
112  .data1        0 : { *(.data1) }
113  /* This section contains data that is initialized during load,
114     but not during the application's initialization sequence.  */
115  .persistent :
116  {
117    *(.persistent)
118  }
119  .bss          0 :
120  {
121   *(.bss)
122  }
123  /* This section contains data that is not initialized during load,
124     or during the application's initialization sequence.  */
125  .noinit (NOLOAD) :
126  {
127    *(.noinit)
128  }
129  .stack        0 :
130  {
131    *(.stack)
132  }
133  /* Stabs debugging sections.  */
134  .stab          0 : { *(.stab) }
135  .stabstr       0 : { *(.stabstr) }
136  .stab.excl     0 : { *(.stab.excl) }
137  .stab.exclstr  0 : { *(.stab.exclstr) }
138  .stab.index    0 : { *(.stab.index) }
139  .stab.indexstr 0 : { *(.stab.indexstr) }
140  .comment       0 : { *(.comment) }
141  .gnu.build.attributes : { *(.gnu.build.attributes) }
142  /* DWARF debug sections.
143     Symbols in the DWARF debugging sections are relative to the beginning
144     of the section so we begin them at 0.  */
145  /* DWARF 1.  */
146  .debug          0 : { *(.debug) }
147  .line           0 : { *(.line) }
148  /* GNU DWARF 1 extensions.  */
149  .debug_srcinfo  0 : { *(.debug_srcinfo) }
150  .debug_sfnames  0 : { *(.debug_sfnames) }
151  /* DWARF 1.1 and DWARF 2.  */
152  .debug_aranges  0 : { *(.debug_aranges) }
153  .debug_pubnames 0 : { *(.debug_pubnames) }
154  /* DWARF 2.  */
155  .debug_info     0 : { *(.debug_info) }
156  .debug_abbrev   0 : { *(.debug_abbrev) }
157  .debug_line     0 : { *(.debug_line) }
158  .debug_frame    0 : { *(.debug_frame) }
159  .debug_str      0 : { *(.debug_str) }
160  .debug_loc      0 : { *(.debug_loc) }
161  .debug_macinfo  0 : { *(.debug_macinfo) }
162  /* SGI/MIPS DWARF 2 extensions.  */
163  .debug_weaknames 0 : { *(.debug_weaknames) }
164  .debug_funcnames 0 : { *(.debug_funcnames) }
165  .debug_typenames 0 : { *(.debug_typenames) }
166  .debug_varnames  0 : { *(.debug_varnames) }
167  /* DWARF 3.  */
168  .debug_pubtypes 0 : { *(.debug_pubtypes) }
169  .debug_ranges   0 : { *(.debug_ranges) }
170  /* DWARF 5.  */
171  .debug_addr     0 : { *(.debug_addr) }
172  .debug_line_str 0 : { *(.debug_line_str) }
173  .debug_loclists 0 : { *(.debug_loclists) }
174  .debug_macro    0 : { *(.debug_macro) }
175  .debug_names    0 : { *(.debug_names) }
176  .debug_rnglists 0 : { *(.debug_rnglists) }
177  .debug_str_offsets 0 : { *(.debug_str_offsets) }
178  .debug_sup      0 : { *(.debug_sup) }
179  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
180  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
181}
182