• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3 * Licensed under the Mulan PSL v2.
4 * You can use this software according to the terms and conditions of the Mulan PSL v2.
5 * You may obtain a copy of Mulan PSL v2 at:
6 *     http://license.coscl.org.cn/MulanPSL2
7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9 * PURPOSE.
10 * See the Mulan PSL v2 for more details.
11 */
12
13OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
14	      "elf32-littlearm")
15OUTPUT_ARCH(arm)
16ENTRY(_start)
17SEARCH_DIR("=/home/tcwg-buildslave/workspace/tcwg-make-release/builder_arch/amd64/label/tcwg-x86_64-build/target/arm-linux-gnueabi/_build/builds/destdir/x86_64-unknown-linux-gnu/arm-linux-gnueabi/lib"); SEARCH_DIR("=/usr/local/lib"); SEARCH_DIR("=/lib"); SEARCH_DIR("=/usr/lib");
18SECTIONS
19{
20  . = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
21  _start = .;
22  .magic : { *(.magic) }
23  .note.gnu.build-id : { *(.note.gnu.build-id) }
24  .hash           : { *(.hash) }
25  .gnu.hash       : { *(.gnu.hash) }
26  .dynsym         : { *(.dynsym) }
27  .dynstr         : { *(.dynstr) }
28  .gnu.version    : { *(.gnu.version) }
29  .gnu.version_d  : { *(.gnu.version_d) }
30  .gnu.version_r  : { *(.gnu.version_r) }
31  .rel.dyn        :
32    {
33      *(.rel.init)
34      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
35      *(.rel.fini)
36      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
37      *(.rel.data.rel.ro .rel.data.rel.ro.* .rel.gnu.linkonce.d.rel.ro.*)
38      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
39      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
40      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
41      *(.rel.ctors)
42      *(.rel.dtors)
43      *(.rel.got)
44      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
45      *(.rel.iplt)
46    }
47  .rela.dyn       :
48    {
49      *(.rela.init)
50      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
51      *(.rela.fini)
52      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
53      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
54      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
55      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
56      *(.rela.ctors)
57      *(.rela.dtors)
58      *(.rela.got)
59      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
60      *(.rela.iplt)
61    }
62  .rel.plt        :
63    {
64      *(.rel.plt)
65    }
66  .rela.plt       :
67    {
68      *(.rela.plt)
69    }
70  . = ALIGN(0x1000);
71  .init           :
72  {
73    KEEP (*(SORT_NONE(.init)))
74  }
75  .plt            : { *(.plt) }
76  .iplt           : { *(.iplt) }
77  .text           :
78  {
79    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
80    *(.text.exit .text.exit.*)
81    *(.text.startup .text.startup.*)
82    *(.text.hot .text.hot.*)
83    *(.text .stub .text.* .gnu.linkonce.t.*)
84    *(.gnu.warning)
85    *(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)
86  }
87  .fini           :
88  {
89    KEEP (*(SORT_NONE(.fini)))
90  }
91  PROVIDE (__etext = .);
92  PROVIDE (_etext = .);
93  PROVIDE (etext = .);
94  . = ALIGN(0x1000);
95  .rodata         :
96  {
97    *(.rodata .rodata.* .gnu.linkonce.r.*)
98    . = ALIGN(16);
99    PROVIDE (__start___llvm_prf_names = .);
100    *(__llvm_prf_names)
101    PROVIDE (__stop___llvm_prf_names = .);
102  }
103  .rodata1        : { *(.rodata1) }
104  .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) }
105   PROVIDE_HIDDEN (__exidx_start = .);
106  .ARM.exidx   : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }
107   PROVIDE_HIDDEN (__exidx_end = .);
108  .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
109  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
110  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
111  .gcc_except_table.*) }
112  .gnu_extab   : ONLY_IF_RO { *(.gnu_extab*) }
113  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
114  .exception_ranges*) }
115  /* Make sure the address of text segment is aligned in 4k for xom */
116  . = ALIGN(0x1000);
117  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
118  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
119  .gnu_extab      : ONLY_IF_RW { *(.gnu_extab) }
120  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
121  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
122  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
123  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
124  .preinit_array     :
125  {
126    KEEP (*(.preinit_array))
127  }
128  .init_array     :
129  {
130    PROVIDE_HIDDEN (__init_array_start = .);
131    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
132    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
133    PROVIDE_HIDDEN (__init_array_end = .);
134  }
135  .fini_array     :
136  {
137    PROVIDE_HIDDEN (__fini_array_start = .);
138    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
139    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
140    PROVIDE_HIDDEN (__fini_array_end = .);
141  }
142  .ctors          :
143  {
144    KEEP (*crtbegin.o(.ctors))
145    KEEP (*crtbegin?.o(.ctors))
146    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
147    KEEP (*(SORT(.ctors.*)))
148    KEEP (*(.ctors))
149  }
150  .dtors          :
151  {
152    KEEP (*crtbegin.o(.dtors))
153    KEEP (*crtbegin?.o(.dtors))
154    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
155    KEEP (*(SORT(.dtors.*)))
156    KEEP (*(.dtors))
157  }
158  .jcr            : { KEEP (*(.jcr)) }
159  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
160  .dynamic        : { *(.dynamic) }
161  .got            : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
162  . = DATA_SEGMENT_RELRO_END (0, .);
163  .data           :
164  {
165    PROVIDE (__data_start = .);
166    *(.data .data.* .gnu.linkonce.d.*)
167    PROVIDE (__start___llvm_prf_cnts = .);
168    *(__llvm_prf_cnts)
169    PROVIDE (__stop___llvm_prf_cnts = .);
170    PROVIDE (__start___llvm_prf_data = .);
171    *(__llvm_prf_data)
172    PROVIDE (__stop___llvm_prf_data = .);
173    PROVIDE (__start___llvm_prf_vnds = .);
174    *(__llvm_prf_vnds);
175    PROVIDE (__stop___llvm_prf_vnds = .);
176    SORT(CONSTRUCTORS)
177  }
178  .data1          : { *(.data1) }
179  _edata = .; PROVIDE (edata = .);
180  . = .;
181  __bss_start = .;
182  __bss_start__ = .;
183  TA_BSS_START = .;
184  .bss            :
185  {
186   *(.dynbss)
187   *(.bss .bss.* .gnu.linkonce.b.*)
188   *(COMMON)
189   . = ALIGN(. != 0 ? 32 / 8 : 1);
190  }
191  TA_BSS_END = .;
192  _bss_end__ = . ; __bss_end__ = . ;
193  . = ALIGN(32 / 8);
194  . = SEGMENT_START("ldata-segment", .);
195  . = ALIGN(32 / 8);
196  __end__ = . ;
197  _end = .; PROVIDE (end = .);
198  . = DATA_SEGMENT_END (.);
199  .stab          0 : { *(.stab) }
200  .stabstr       0 : { *(.stabstr) }
201  .stab.excl     0 : { *(.stab.excl) }
202  .stab.exclstr  0 : { *(.stab.exclstr) }
203  .stab.index    0 : { *(.stab.index) }
204  .stab.indexstr 0 : { *(.stab.indexstr) }
205  .comment       0 : { *(.comment) }
206  .debug          0 : { *(.debug) }
207  .line           0 : { *(.line) }
208  .debug_srcinfo  0 : { *(.debug_srcinfo) }
209  .debug_sfnames  0 : { *(.debug_sfnames) }
210  .debug_aranges  0 : { *(.debug_aranges) }
211  .debug_pubnames 0 : { *(.debug_pubnames) }
212  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
213  .debug_abbrev   0 : { *(.debug_abbrev) }
214  .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end ) }
215  .debug_frame    0 : { *(.debug_frame) }
216  .debug_str      0 : { *(.debug_str) }
217  .debug_loc      0 : { *(.debug_loc) }
218  .debug_macinfo  0 : { *(.debug_macinfo) }
219  .debug_weaknames 0 : { *(.debug_weaknames) }
220  .debug_funcnames 0 : { *(.debug_funcnames) }
221  .debug_typenames 0 : { *(.debug_typenames) }
222  .debug_varnames  0 : { *(.debug_varnames) }
223  .debug_pubtypes 0 : { *(.debug_pubtypes) }
224  .debug_ranges   0 : { *(.debug_ranges) }
225  .debug_macro    0 : { *(.debug_macro) }
226  .debug_addr     0 : { *(.debug_addr) }
227  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
228  .note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }
229  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
230}
231