1b1994897Sopenharmony_ci/* Huawei Technologies Co.,Ltd. */
2b1994897Sopenharmony_ci
3b1994897Sopenharmony_ci/*
4b1994897Sopenharmony_ci    Panda linker script for placement of sections above 4GB.
5b1994897Sopenharmony_ci*/
6b1994897Sopenharmony_ciENTRY(_start)
7b1994897Sopenharmony_ciSECTIONS {
8b1994897Sopenharmony_ci    /*
9b1994897Sopenharmony_ci    According to asan_mapping.h mem range lower ~2G is safe for usage on all platforms.
10b1994897Sopenharmony_ci    So memory map is set up for data in 0..1G and ELF in 1..2G.
11b1994897Sopenharmony_ci
12b1994897Sopenharmony_ci    Typical shadow mapping on Linux/x86_64 with SHADOW_OFFSET == 0x00007fff8000:
13b1994897Sopenharmony_ci    || `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
14b1994897Sopenharmony_ci    || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
15b1994897Sopenharmony_ci    || `[0x00008fff7000, 0x02008fff6fff]` || ShadowGap  ||
16b1994897Sopenharmony_ci    || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
17b1994897Sopenharmony_ci    || `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
18b1994897Sopenharmony_ci
19b1994897Sopenharmony_ci    When SHADOW_OFFSET is zero (-pie):
20b1994897Sopenharmony_ci    || `[0x100000000000, 0x7fffffffffff]` || HighMem    ||
21b1994897Sopenharmony_ci    || `[0x020000000000, 0x0fffffffffff]` || HighShadow ||
22b1994897Sopenharmony_ci    || `[0x000000040000, 0x01ffffffffff]` || ShadowGap  ||
23b1994897Sopenharmony_ci
24b1994897Sopenharmony_ci    Special case when something is already mapped between
25b1994897Sopenharmony_ci    0x003000000000 and 0x005000000000 (e.g. when prelink is installed):
26b1994897Sopenharmony_ci    || `[0x10007fff8000, 0x7fffffffffff]` || HighMem    ||
27b1994897Sopenharmony_ci    || `[0x02008fff7000, 0x10007fff7fff]` || HighShadow ||
28b1994897Sopenharmony_ci    || `[0x005000000000, 0x02008fff6fff]` || ShadowGap3 ||
29b1994897Sopenharmony_ci    || `[0x003000000000, 0x004fffffffff]` || MidMem     ||
30b1994897Sopenharmony_ci    || `[0x000a7fff8000, 0x002fffffffff]` || ShadowGap2 ||
31b1994897Sopenharmony_ci    || `[0x00067fff8000, 0x000a7fff7fff]` || MidShadow  ||
32b1994897Sopenharmony_ci    || `[0x00008fff7000, 0x00067fff7fff]` || ShadowGap  ||
33b1994897Sopenharmony_ci    || `[0x00007fff8000, 0x00008fff6fff]` || LowShadow  ||
34b1994897Sopenharmony_ci    || `[0x000000000000, 0x00007fff7fff]` || LowMem     ||
35b1994897Sopenharmony_ci
36b1994897Sopenharmony_ci    Default Linux/i386 mapping on x86_64 machine:
37b1994897Sopenharmony_ci    || `[0x40000000, 0xffffffff]` || HighMem    ||
38b1994897Sopenharmony_ci    || `[0x28000000, 0x3fffffff]` || HighShadow ||
39b1994897Sopenharmony_ci    || `[0x24000000, 0x27ffffff]` || ShadowGap  ||
40b1994897Sopenharmony_ci    || `[0x20000000, 0x23ffffff]` || LowShadow  ||
41b1994897Sopenharmony_ci    || `[0x00000000, 0x1fffffff]` || LowMem     ||
42b1994897Sopenharmony_ci
43b1994897Sopenharmony_ci    Default Linux/i386 mapping on i386 machine
44b1994897Sopenharmony_ci    (addresses starting with 0xc0000000 are reserved
45b1994897Sopenharmony_ci    for kernel and thus not sanitized):
46b1994897Sopenharmony_ci    || `[0x38000000, 0xbfffffff]` || HighMem    ||
47b1994897Sopenharmony_ci    || `[0x27000000, 0x37ffffff]` || HighShadow ||
48b1994897Sopenharmony_ci    || `[0x24000000, 0x26ffffff]` || ShadowGap  ||
49b1994897Sopenharmony_ci    || `[0x20000000, 0x23ffffff]` || LowShadow  ||
50b1994897Sopenharmony_ci    || `[0x00000000, 0x1fffffff]` || LowMem     ||
51b1994897Sopenharmony_ci
52b1994897Sopenharmony_ci    Default Linux/MIPS32 mapping:
53b1994897Sopenharmony_ci    || `[0x2aaa0000, 0xffffffff]` || HighMem    ||
54b1994897Sopenharmony_ci    || `[0x0fff4000, 0x2aa9ffff]` || HighShadow ||
55b1994897Sopenharmony_ci    || `[0x0bff4000, 0x0fff3fff]` || ShadowGap  ||
56b1994897Sopenharmony_ci    || `[0x0aaa0000, 0x0bff3fff]` || LowShadow  ||
57b1994897Sopenharmony_ci    || `[0x00000000, 0x0aa9ffff]` || LowMem     ||
58b1994897Sopenharmony_ci
59b1994897Sopenharmony_ci    Default Linux/MIPS64 mapping:
60b1994897Sopenharmony_ci    || `[0x4000000000, 0xffffffffff]` || HighMem    ||
61b1994897Sopenharmony_ci    || `[0x2800000000, 0x3fffffffff]` || HighShadow ||
62b1994897Sopenharmony_ci    || `[0x2400000000, 0x27ffffffff]` || ShadowGap  ||
63b1994897Sopenharmony_ci    || `[0x2000000000, 0x23ffffffff]` || LowShadow  ||
64b1994897Sopenharmony_ci    || `[0x0000000000, 0x1fffffffff]` || LowMem     ||
65b1994897Sopenharmony_ci
66b1994897Sopenharmony_ci    Default Linux/AArch64 (39-bit VMA) mapping:
67b1994897Sopenharmony_ci    || `[0x2000000000, 0x7fffffffff]` || highmem    ||
68b1994897Sopenharmony_ci    || `[0x1400000000, 0x1fffffffff]` || highshadow ||
69b1994897Sopenharmony_ci    || `[0x1200000000, 0x13ffffffff]` || shadowgap  ||
70b1994897Sopenharmony_ci    || `[0x1000000000, 0x11ffffffff]` || lowshadow  ||
71b1994897Sopenharmony_ci    || `[0x0000000000, 0x0fffffffff]` || lowmem     ||
72b1994897Sopenharmony_ci
73b1994897Sopenharmony_ci    Default Linux/AArch64 (42-bit VMA) mapping:
74b1994897Sopenharmony_ci    || `[0x10000000000, 0x3ffffffffff]` || highmem    ||
75b1994897Sopenharmony_ci    || `[0x0a000000000, 0x0ffffffffff]` || highshadow ||
76b1994897Sopenharmony_ci    || `[0x09000000000, 0x09fffffffff]` || shadowgap  ||
77b1994897Sopenharmony_ci    || `[0x08000000000, 0x08fffffffff]` || lowshadow  ||
78b1994897Sopenharmony_ci    || `[0x00000000000, 0x07fffffffff]` || lowmem     ||
79b1994897Sopenharmony_ci
80b1994897Sopenharmony_ci    Default Linux/S390 mapping:
81b1994897Sopenharmony_ci    || `[0x30000000, 0x7fffffff]` || HighMem    ||
82b1994897Sopenharmony_ci    || `[0x26000000, 0x2fffffff]` || HighShadow ||
83b1994897Sopenharmony_ci    || `[0x24000000, 0x25ffffff]` || ShadowGap  ||
84b1994897Sopenharmony_ci    || `[0x20000000, 0x23ffffff]` || LowShadow  ||
85b1994897Sopenharmony_ci    || `[0x00000000, 0x1fffffff]` || LowMem     ||
86b1994897Sopenharmony_ci
87b1994897Sopenharmony_ci    Default Linux/SystemZ mapping:
88b1994897Sopenharmony_ci    || `[0x14000000000000, 0x1fffffffffffff]` || HighMem    ||
89b1994897Sopenharmony_ci    || `[0x12800000000000, 0x13ffffffffffff]` || HighShadow ||
90b1994897Sopenharmony_ci    || `[0x12000000000000, 0x127fffffffffff]` || ShadowGap  ||
91b1994897Sopenharmony_ci    || `[0x10000000000000, 0x11ffffffffffff]` || LowShadow  ||
92b1994897Sopenharmony_ci    || `[0x00000000000000, 0x0fffffffffffff]` || LowMem     ||
93b1994897Sopenharmony_ci
94b1994897Sopenharmony_ci    Shadow mapping on FreeBSD/x86-64 with SHADOW_OFFSET == 0x400000000000:
95b1994897Sopenharmony_ci    || `[0x500000000000, 0x7fffffffffff]` || HighMem    ||
96b1994897Sopenharmony_ci    || `[0x4a0000000000, 0x4fffffffffff]` || HighShadow ||
97b1994897Sopenharmony_ci    || `[0x480000000000, 0x49ffffffffff]` || ShadowGap  ||
98b1994897Sopenharmony_ci    || `[0x400000000000, 0x47ffffffffff]` || LowShadow  ||
99b1994897Sopenharmony_ci    || `[0x000000000000, 0x3fffffffffff]` || LowMem     ||
100b1994897Sopenharmony_ci
101b1994897Sopenharmony_ci    Shadow mapping on FreeBSD/i386 with SHADOW_OFFSET == 0x40000000:
102b1994897Sopenharmony_ci    || `[0x60000000, 0xffffffff]` || HighMem    ||
103b1994897Sopenharmony_ci    || `[0x4c000000, 0x5fffffff]` || HighShadow ||
104b1994897Sopenharmony_ci    || `[0x48000000, 0x4bffffff]` || ShadowGap  ||
105b1994897Sopenharmony_ci    || `[0x40000000, 0x47ffffff]` || LowShadow  ||
106b1994897Sopenharmony_ci    || `[0x00000000, 0x3fffffff]` || LowMem     ||
107b1994897Sopenharmony_ci
108b1994897Sopenharmony_ci    Shadow mapping on NetBSD/x86-64 with SHADOW_OFFSET == 0x400000000000:
109b1994897Sopenharmony_ci    || `[0x4feffffffe01, 0x7f7ffffff000]` || HighMem    ||
110b1994897Sopenharmony_ci    || `[0x49fdffffffc0, 0x4feffffffe00]` || HighShadow ||
111b1994897Sopenharmony_ci    || `[0x480000000000, 0x49fdffffffbf]` || ShadowGap  ||
112b1994897Sopenharmony_ci    || `[0x400000000000, 0x47ffffffffff]` || LowShadow  ||
113b1994897Sopenharmony_ci    || `[0x000000000000, 0x3fffffffffff]` || LowMem     ||
114b1994897Sopenharmony_ci
115b1994897Sopenharmony_ci    Default Windows/i386 mapping:
116b1994897Sopenharmony_ci    (the exact location of HighShadow/HighMem may vary depending
117b1994897Sopenharmony_ci     on WoW64, /LARGEADDRESSAWARE, etc).
118b1994897Sopenharmony_ci    || `[0x50000000, 0xffffffff]` || HighMem    ||
119b1994897Sopenharmony_ci    || `[0x3a000000, 0x4fffffff]` || HighShadow ||
120b1994897Sopenharmony_ci    || `[0x36000000, 0x39ffffff]` || ShadowGap  ||
121b1994897Sopenharmony_ci    || `[0x30000000, 0x35ffffff]` || LowShadow  ||
122b1994897Sopenharmony_ci    || `[0x00000000, 0x2fffffff]` || LowMem     ||
123b1994897Sopenharmony_ci
124b1994897Sopenharmony_ci
125b1994897Sopenharmony_ci    NB: this mapping imposes limit on available memory limit in ~1G for Panda VM.
126b1994897Sopenharmony_ci    */
127b1994897Sopenharmony_ci
128b1994897Sopenharmony_ci    . =  0x40000000 + SIZEOF_HEADERS;
129b1994897Sopenharmony_ci
130b1994897Sopenharmony_ci  .interp         : { *(.interp) }
131b1994897Sopenharmony_ci  .note.gnu.build-id : { *(.note.gnu.build-id) }
132b1994897Sopenharmony_ci  .hash           : { *(.hash) }
133b1994897Sopenharmony_ci  .gnu.hash       : { *(.gnu.hash) }
134b1994897Sopenharmony_ci  .dynsym         : { *(.dynsym) }
135b1994897Sopenharmony_ci  .dynstr         : { *(.dynstr) }
136b1994897Sopenharmony_ci  .gnu.version    : { *(.gnu.version) }
137b1994897Sopenharmony_ci  .gnu.version_d  : { *(.gnu.version_d) }
138b1994897Sopenharmony_ci  .gnu.version_r  : { *(.gnu.version_r) }
139b1994897Sopenharmony_ci  .rela.dyn       :
140b1994897Sopenharmony_ci    {
141b1994897Sopenharmony_ci      *(.rela.init)
142b1994897Sopenharmony_ci      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
143b1994897Sopenharmony_ci      *(.rela.fini)
144b1994897Sopenharmony_ci      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
145b1994897Sopenharmony_ci      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
146b1994897Sopenharmony_ci      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
147b1994897Sopenharmony_ci      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
148b1994897Sopenharmony_ci      *(.rela.ctors)
149b1994897Sopenharmony_ci      *(.rela.dtors)
150b1994897Sopenharmony_ci      *(.rela.got)
151b1994897Sopenharmony_ci      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
152b1994897Sopenharmony_ci      *(.rela.ldata .rela.ldata.* .rela.gnu.linkonce.l.*)
153b1994897Sopenharmony_ci      *(.rela.lbss .rela.lbss.* .rela.gnu.linkonce.lb.*)
154b1994897Sopenharmony_ci      *(.rela.lrodata .rela.lrodata.* .rela.gnu.linkonce.lr.*)
155b1994897Sopenharmony_ci      *(.rela.ifunc)
156b1994897Sopenharmony_ci    }
157b1994897Sopenharmony_ci  .rela.plt       :
158b1994897Sopenharmony_ci    {
159b1994897Sopenharmony_ci      *(.rela.plt)
160b1994897Sopenharmony_ci      PROVIDE_HIDDEN (__rela_iplt_start = .);
161b1994897Sopenharmony_ci      *(.rela.iplt)
162b1994897Sopenharmony_ci      PROVIDE_HIDDEN (__rela_iplt_end = .);
163b1994897Sopenharmony_ci    }
164b1994897Sopenharmony_ci  .init           :
165b1994897Sopenharmony_ci  {
166b1994897Sopenharmony_ci    KEEP (*(SORT_NONE(.init)))
167b1994897Sopenharmony_ci  }
168b1994897Sopenharmony_ci  .plt            : { *(.plt) *(.iplt) }
169b1994897Sopenharmony_ci.plt.got        : { *(.plt.got) }
170b1994897Sopenharmony_ci.plt.sec        : { *(.plt.sec) }
171b1994897Sopenharmony_ci  .text           :
172b1994897Sopenharmony_ci  {
173b1994897Sopenharmony_ci    *(.text.unlikely .text.*_unlikely .text.unlikely.*)
174b1994897Sopenharmony_ci    *(.text.exit .text.exit.*)
175b1994897Sopenharmony_ci    *(.text.startup .text.startup.*)
176b1994897Sopenharmony_ci    *(.text.hot .text.hot.*)
177b1994897Sopenharmony_ci    *(.text .stub .text.* .gnu.linkonce.t.*)
178b1994897Sopenharmony_ci    /* .gnu.warning sections are handled specially by elf32.em.  */
179b1994897Sopenharmony_ci    *(.gnu.warning)
180b1994897Sopenharmony_ci  }
181b1994897Sopenharmony_ci  .fini           :
182b1994897Sopenharmony_ci  {
183b1994897Sopenharmony_ci    KEEP (*(SORT_NONE(.fini)))
184b1994897Sopenharmony_ci  }
185b1994897Sopenharmony_ci  PROVIDE (__etext = .);
186b1994897Sopenharmony_ci  PROVIDE (_etext = .);
187b1994897Sopenharmony_ci  PROVIDE (etext = .);
188b1994897Sopenharmony_ci  .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
189b1994897Sopenharmony_ci  .rodata1        : { *(.rodata1) }
190b1994897Sopenharmony_ci  .eh_frame_hdr : { *(.eh_frame_hdr) *(.eh_frame_entry .eh_frame_entry.*) }
191b1994897Sopenharmony_ci  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) *(.eh_frame.*) }
192b1994897Sopenharmony_ci  .gcc_except_table   : ONLY_IF_RO { *(.gcc_except_table
193b1994897Sopenharmony_ci  .gcc_except_table.*) }
194b1994897Sopenharmony_ci  .gnu_extab   : ONLY_IF_RO { *(.gnu_extab*) }
195b1994897Sopenharmony_ci  /* These sections are generated by the Sun/Oracle C++ compiler.  */
196b1994897Sopenharmony_ci  .exception_ranges   : ONLY_IF_RO { *(.exception_ranges
197b1994897Sopenharmony_ci  .exception_ranges*) }
198b1994897Sopenharmony_ci  /* Adjust the address for the data segment.  We want to adjust up to
199b1994897Sopenharmony_ci     the same address within the page on the next page up.  */
200b1994897Sopenharmony_ci  . = DATA_SEGMENT_ALIGN (CONSTANT (MAXPAGESIZE), CONSTANT (COMMONPAGESIZE));
201b1994897Sopenharmony_ci  /* Exception handling  */
202b1994897Sopenharmony_ci  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) *(.eh_frame.*) }
203b1994897Sopenharmony_ci  .gnu_extab      : ONLY_IF_RW { *(.gnu_extab) }
204b1994897Sopenharmony_ci  .gcc_except_table   : ONLY_IF_RW { *(.gcc_except_table .gcc_except_table.*) }
205b1994897Sopenharmony_ci  .exception_ranges   : ONLY_IF_RW { *(.exception_ranges .exception_ranges*) }
206b1994897Sopenharmony_ci  /* Thread Local Storage sections  */
207b1994897Sopenharmony_ci  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
208b1994897Sopenharmony_ci  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
209b1994897Sopenharmony_ci  .preinit_array     :
210b1994897Sopenharmony_ci  {
211b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__preinit_array_start = .);
212b1994897Sopenharmony_ci    KEEP (*(.preinit_array))
213b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__preinit_array_end = .);
214b1994897Sopenharmony_ci  }
215b1994897Sopenharmony_ci  .init_array     :
216b1994897Sopenharmony_ci  {
217b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__init_array_start = .);
218b1994897Sopenharmony_ci    KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
219b1994897Sopenharmony_ci    KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
220b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__init_array_end = .);
221b1994897Sopenharmony_ci  }
222b1994897Sopenharmony_ci  .fini_array     :
223b1994897Sopenharmony_ci  {
224b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__fini_array_start = .);
225b1994897Sopenharmony_ci    KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
226b1994897Sopenharmony_ci    KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
227b1994897Sopenharmony_ci    PROVIDE_HIDDEN (__fini_array_end = .);
228b1994897Sopenharmony_ci  }
229b1994897Sopenharmony_ci  .ctors          :
230b1994897Sopenharmony_ci  {
231b1994897Sopenharmony_ci    /* gcc uses crtbegin.o to find the start of
232b1994897Sopenharmony_ci       the constructors, so we make sure it is
233b1994897Sopenharmony_ci       first.  Because this is a wildcard, it
234b1994897Sopenharmony_ci       doesn't matter if the user does not
235b1994897Sopenharmony_ci       actually link against crtbegin.o; the
236b1994897Sopenharmony_ci       linker won't look for a file to match a
237b1994897Sopenharmony_ci       wildcard.  The wildcard also means that it
238b1994897Sopenharmony_ci       doesn't matter which directory crtbegin.o
239b1994897Sopenharmony_ci       is in.  */
240b1994897Sopenharmony_ci    KEEP (*crtbegin.o(.ctors))
241b1994897Sopenharmony_ci    KEEP (*crtbegin?.o(.ctors))
242b1994897Sopenharmony_ci    /* We don't want to include the .ctor section from
243b1994897Sopenharmony_ci       the crtend.o file until after the sorted ctors.
244b1994897Sopenharmony_ci       The .ctor section from the crtend file contains the
245b1994897Sopenharmony_ci       end of ctors marker and it must be last */
246b1994897Sopenharmony_ci    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
247b1994897Sopenharmony_ci    KEEP (*(SORT(.ctors.*)))
248b1994897Sopenharmony_ci    KEEP (*(.ctors))
249b1994897Sopenharmony_ci  }
250b1994897Sopenharmony_ci  .dtors          :
251b1994897Sopenharmony_ci  {
252b1994897Sopenharmony_ci    KEEP (*crtbegin.o(.dtors))
253b1994897Sopenharmony_ci    KEEP (*crtbegin?.o(.dtors))
254b1994897Sopenharmony_ci    KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
255b1994897Sopenharmony_ci    KEEP (*(SORT(.dtors.*)))
256b1994897Sopenharmony_ci    KEEP (*(.dtors))
257b1994897Sopenharmony_ci  }
258b1994897Sopenharmony_ci  .jcr            : { KEEP (*(.jcr)) }
259b1994897Sopenharmony_ci  .data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro .data.rel.ro.* .gnu.linkonce.d.rel.ro.*) }
260b1994897Sopenharmony_ci  .dynamic        : { *(.dynamic) }
261b1994897Sopenharmony_ci  .got            : { *(.got) *(.igot) }
262b1994897Sopenharmony_ci  . = DATA_SEGMENT_RELRO_END (SIZEOF (.got.plt) >= 24 ? 24 : 0, .);
263b1994897Sopenharmony_ci  .got.plt        : { *(.got.plt)  *(.igot.plt) }
264b1994897Sopenharmony_ci  .data           :
265b1994897Sopenharmony_ci  {
266b1994897Sopenharmony_ci    *(.data .data.* .gnu.linkonce.d.*)
267b1994897Sopenharmony_ci    SORT(CONSTRUCTORS)
268b1994897Sopenharmony_ci  }
269b1994897Sopenharmony_ci  .data1          : { *(.data1) }
270b1994897Sopenharmony_ci  _edata = .; PROVIDE (edata = .);
271b1994897Sopenharmony_ci  . = .;
272b1994897Sopenharmony_ci  __bss_start = .;
273b1994897Sopenharmony_ci  .bss            :
274b1994897Sopenharmony_ci  {
275b1994897Sopenharmony_ci   *(.dynbss)
276b1994897Sopenharmony_ci   *(.bss .bss.* .gnu.linkonce.b.*)
277b1994897Sopenharmony_ci   *(COMMON)
278b1994897Sopenharmony_ci   /* Align here to ensure that the .bss section occupies space up to
279b1994897Sopenharmony_ci      _end.  Align after .bss to ensure correct alignment even if the
280b1994897Sopenharmony_ci      .bss section disappears because there are no input sections.
281b1994897Sopenharmony_ci      FIXME: Why do we need it? When there is no .bss section, we don't
282b1994897Sopenharmony_ci      pad the .data section.  */
283b1994897Sopenharmony_ci   . = ALIGN(. != 0 ? 64 / 8 : 1);
284b1994897Sopenharmony_ci  }
285b1994897Sopenharmony_ci  .lbss   :
286b1994897Sopenharmony_ci  {
287b1994897Sopenharmony_ci    *(.dynlbss)
288b1994897Sopenharmony_ci    *(.lbss .lbss.* .gnu.linkonce.lb.*)
289b1994897Sopenharmony_ci    *(LARGE_COMMON)
290b1994897Sopenharmony_ci  }
291b1994897Sopenharmony_ci  . = ALIGN(64 / 8);
292b1994897Sopenharmony_ci  . = SEGMENT_START("ldata-segment", .);
293b1994897Sopenharmony_ci  .lrodata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
294b1994897Sopenharmony_ci  {
295b1994897Sopenharmony_ci    *(.lrodata .lrodata.* .gnu.linkonce.lr.*)
296b1994897Sopenharmony_ci  }
297b1994897Sopenharmony_ci  .ldata   ALIGN(CONSTANT (MAXPAGESIZE)) + (. & (CONSTANT (MAXPAGESIZE) - 1)) :
298b1994897Sopenharmony_ci  {
299b1994897Sopenharmony_ci    *(.ldata .ldata.* .gnu.linkonce.l.*)
300b1994897Sopenharmony_ci    . = ALIGN(. != 0 ? 64 / 8 : 1);
301b1994897Sopenharmony_ci  }
302b1994897Sopenharmony_ci  . = ALIGN(64 / 8);
303b1994897Sopenharmony_ci  _end = .; PROVIDE (end = .);
304b1994897Sopenharmony_ci  . = DATA_SEGMENT_END (.);
305b1994897Sopenharmony_ci  /* Stabs debugging sections.  */
306b1994897Sopenharmony_ci  .stab          0 : { *(.stab) }
307b1994897Sopenharmony_ci  .stabstr       0 : { *(.stabstr) }
308b1994897Sopenharmony_ci  .stab.excl     0 : { *(.stab.excl) }
309b1994897Sopenharmony_ci  .stab.exclstr  0 : { *(.stab.exclstr) }
310b1994897Sopenharmony_ci  .stab.index    0 : { *(.stab.index) }
311b1994897Sopenharmony_ci  .stab.indexstr 0 : { *(.stab.indexstr) }
312b1994897Sopenharmony_ci  .comment       0 : { *(.comment) }
313b1994897Sopenharmony_ci  /* DWARF debug sections.
314b1994897Sopenharmony_ci     Symbols in the DWARF debugging sections are relative to the beginning
315b1994897Sopenharmony_ci     of the section so we begin them at 0.  */
316b1994897Sopenharmony_ci  /* DWARF 1 */
317b1994897Sopenharmony_ci  .debug          0 : { *(.debug) }
318b1994897Sopenharmony_ci  .line           0 : { *(.line) }
319b1994897Sopenharmony_ci  /* GNU DWARF 1 extensions */
320b1994897Sopenharmony_ci  .debug_srcinfo  0 : { *(.debug_srcinfo) }
321b1994897Sopenharmony_ci  .debug_sfnames  0 : { *(.debug_sfnames) }
322b1994897Sopenharmony_ci  /* DWARF 1.1 and DWARF 2 */
323b1994897Sopenharmony_ci  .debug_aranges  0 : { *(.debug_aranges) }
324b1994897Sopenharmony_ci  .debug_pubnames 0 : { *(.debug_pubnames) }
325b1994897Sopenharmony_ci  /* DWARF 2 */
326b1994897Sopenharmony_ci  .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
327b1994897Sopenharmony_ci  .debug_abbrev   0 : { *(.debug_abbrev) }
328b1994897Sopenharmony_ci  .debug_line     0 : { *(.debug_line .debug_line.* .debug_line_end ) }
329b1994897Sopenharmony_ci  .debug_frame    0 : { *(.debug_frame) }
330b1994897Sopenharmony_ci  .debug_str      0 : { *(.debug_str) }
331b1994897Sopenharmony_ci  .debug_loc      0 : { *(.debug_loc) }
332b1994897Sopenharmony_ci  .debug_macinfo  0 : { *(.debug_macinfo) }
333b1994897Sopenharmony_ci  /* SGI/MIPS DWARF 2 extensions */
334b1994897Sopenharmony_ci  .debug_weaknames 0 : { *(.debug_weaknames) }
335b1994897Sopenharmony_ci  .debug_funcnames 0 : { *(.debug_funcnames) }
336b1994897Sopenharmony_ci  .debug_typenames 0 : { *(.debug_typenames) }
337b1994897Sopenharmony_ci  .debug_varnames  0 : { *(.debug_varnames) }
338b1994897Sopenharmony_ci  /* DWARF 3 */
339b1994897Sopenharmony_ci  .debug_pubtypes 0 : { *(.debug_pubtypes) }
340b1994897Sopenharmony_ci  .debug_ranges   0 : { *(.debug_ranges) }
341b1994897Sopenharmony_ci  /* DWARF Extension.  */
342b1994897Sopenharmony_ci  .debug_macro    0 : { *(.debug_macro) }
343b1994897Sopenharmony_ci  .debug_addr     0 : { *(.debug_addr) }
344b1994897Sopenharmony_ci  .gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
345b1994897Sopenharmony_ci  /DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
346b1994897Sopenharmony_ci
347b1994897Sopenharmony_ci}
348b1994897Sopenharmony_ci