1/*
2 * Copyright (c) 2006-2023, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * 2017-5-30     bernard       first version
8 */
9
10/* _EL1_STACK_SIZE = DEFINED(_EL1_STACK_SIZE) ? _EL1_STACK_SIZE : 0x20000; */
11
12SECTIONS
13{
14    . = 0x80000;
15    . = ALIGN(4096);
16    .text :
17    {
18        KEEP(*(.text.entrypoint))       /* The entry point */
19        *(.vectors)
20        *(.text)                        /* remaining code */
21        *(.text.*)                      /* remaining code */
22
23        *(.rodata)                      /* read-only data (constants) */
24        *(.rodata*)
25        *(.glue_7)
26        *(.glue_7t)
27        *(.gnu.linkonce.t*)
28
29        *(COMMON)
30
31        /* section information for finsh shell */
32        . = ALIGN(16);
33        __fsymtab_start = .;
34        KEEP(*(FSymTab))
35        __fsymtab_end = .;
36        . = ALIGN(16);
37        __vsymtab_start = .;
38        KEEP(*(VSymTab))
39        __vsymtab_end = .;
40        . = ALIGN(16);
41
42        /* section information for initial. */
43        . = ALIGN(16);
44        __rt_init_start = .;
45        KEEP(*(SORT(.rti_fn*)))
46        __rt_init_end = .;
47        . = ALIGN(16);
48
49        . = ALIGN(16);
50        _etext = .;
51    }
52
53    .eh_frame_hdr :
54    {
55         *(.eh_frame_hdr)
56         *(.eh_frame_entry)
57    }
58    .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
59
60    . = ALIGN(16);
61    .data :
62    {
63     *(.data)
64     *(.data.*)
65
66     *(.data1)
67     *(.data1.*)
68
69     . = ALIGN(16);
70     _gp = ABSOLUTE(.);     /* Base of small data */
71
72     *(.sdata)
73     *(.sdata.*)
74    }
75
76    . = ALIGN(16);
77    .ctors :
78    {
79        PROVIDE(__ctors_start__ = .);
80        /* new GCC version uses .init_array */
81        KEEP(*(SORT(.init_array.*)))
82        KEEP(*(.init_array))
83        PROVIDE(__ctors_end__ = .);
84    }
85
86    .dtors :
87    {
88        PROVIDE(__dtors_start__ = .);
89        KEEP(*(SORT(.dtors.*)))
90        KEEP(*(.dtors))
91        PROVIDE(__dtors_end__ = .);
92    }
93
94    . = ALIGN(16);
95    .bss :
96    {
97        PROVIDE(__bss_start = .);
98        *(.bss)
99        *(.bss.*)
100        *(.dynbss)
101
102        PROVIDE(__bss_end = .);
103    }
104    _end = .;
105
106    /* Stabs debugging sections.  */
107    .stab          0 : { *(.stab) }
108    .stabstr       0 : { *(.stabstr) }
109    .stab.excl     0 : { *(.stab.excl) }
110    .stab.exclstr  0 : { *(.stab.exclstr) }
111    .stab.index    0 : { *(.stab.index) }
112    .stab.indexstr 0 : { *(.stab.indexstr) }
113    .comment       0 : { *(.comment) }
114    /* DWARF debug sections.
115     * Symbols in the DWARF debugging sections are relative to the beginning
116     * of the section so we begin them at 0.  */
117    /* DWARF 1 */
118    .debug          0 : { *(.debug) }
119    .line           0 : { *(.line) }
120    /* GNU DWARF 1 extensions */
121    .debug_srcinfo  0 : { *(.debug_srcinfo) }
122    .debug_sfnames  0 : { *(.debug_sfnames) }
123    /* DWARF 1.1 and DWARF 2 */
124    .debug_aranges  0 : { *(.debug_aranges) }
125    .debug_pubnames 0 : { *(.debug_pubnames) }
126    /* DWARF 2 */
127    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
128    .debug_abbrev   0 : { *(.debug_abbrev) }
129    .debug_line     0 : { *(.debug_line) }
130    .debug_frame    0 : { *(.debug_frame) }
131    .debug_str      0 : { *(.debug_str) }
132    .debug_loc      0 : { *(.debug_loc) }
133    .debug_macinfo  0 : { *(.debug_macinfo) }
134    /* SGI/MIPS DWARF 2 extensions */
135    .debug_weaknames 0 : { *(.debug_weaknames) }
136    .debug_funcnames 0 : { *(.debug_funcnames) }
137    .debug_typenames 0 : { *(.debug_typenames) }
138    .debug_varnames  0 : { *(.debug_varnames) }
139}
140
141__bss_size = SIZEOF(.bss);
142