1/* Script for -r */
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  }
111  .data1        0 : { *(.data1) }
112  /* This section contains data that is initialized during load,
113     but not during the application's initialization sequence.  */
114  .persistent :
115  {
116    *(.persistent)
117  }
118  .bss          0 :
119  {
120   *(.bss)
121  }
122  /* This section contains data that is not initialized during load,
123     or during the application's initialization sequence.  */
124  .noinit (NOLOAD) :
125  {
126    *(.noinit)
127  }
128  .stack        0 :
129  {
130    *(.stack)
131  }
132  /* Stabs debugging sections.  */
133  .stab          0 : { *(.stab) }
134  .stabstr       0 : { *(.stabstr) }
135  .stab.excl     0 : { *(.stab.excl) }
136  .stab.exclstr  0 : { *(.stab.exclstr) }
137  .stab.index    0 : { *(.stab.index) }
138  .stab.indexstr 0 : { *(.stab.indexstr) }
139  .comment       0 : { *(.comment) }
140  .gnu.build.attributes : { *(.gnu.build.attributes) }
141  /* DWARF debug sections.
142     Symbols in the DWARF debugging sections are relative to the beginning
143     of the section so we begin them at 0.  */
144  /* DWARF 1.  */
145  .debug          0 : { *(.debug) }
146  .line           0 : { *(.line) }
147  /* GNU DWARF 1 extensions.  */
148  .debug_srcinfo  0 : { *(.debug_srcinfo) }
149  .debug_sfnames  0 : { *(.debug_sfnames) }
150  /* DWARF 1.1 and DWARF 2.  */
151  .debug_aranges  0 : { *(.debug_aranges) }
152  .debug_pubnames 0 : { *(.debug_pubnames) }
153  /* DWARF 2.  */
154  .debug_info     0 : { *(.debug_info) }
155  .debug_abbrev   0 : { *(.debug_abbrev) }
156  .debug_line     0 : { *(.debug_line) }
157  .debug_frame    0 : { *(.debug_frame) }
158  .debug_str      0 : { *(.debug_str) }
159  .debug_loc      0 : { *(.debug_loc) }
160  .debug_macinfo  0 : { *(.debug_macinfo) }
161  /* SGI/MIPS DWARF 2 extensions.  */
162  .debug_weaknames 0 : { *(.debug_weaknames) }
163  .debug_funcnames 0 : { *(.debug_funcnames) }
164  .debug_typenames 0 : { *(.debug_typenames) }
165  .debug_varnames  0 : { *(.debug_varnames) }
166  /* DWARF 3.  */
167  .debug_pubtypes 0 : { *(.debug_pubtypes) }
168  .debug_ranges   0 : { *(.debug_ranges) }
169  /* DWARF 5.  */
170  .debug_addr     0 : { *(.debug_addr) }
171  .debug_line_str 0 : { *(.debug_line_str) }
172  .debug_loclists 0 : { *(.debug_loclists) }
173  .debug_macro    0 : { *(.debug_macro) }
174  .debug_names    0 : { *(.debug_names) }
175  .debug_rnglists 0 : { *(.debug_rnglists) }
176  .debug_str_offsets 0 : { *(.debug_str_offsets) }
177  .debug_sup      0 : { *(.debug_sup) }
178  .ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }
179  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
180}
181