1/*
2 * Copyright (c) 2006-2021, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date           Author       Notes
8 * 2021-09-09     linzhenxing  first version
9 */
10OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
11OUTPUT_ARCH(arm)
12
13/* _EL1_STACK_SIZE = DEFINED(_EL1_STACK_SIZE) ? _EL1_STACK_SIZE : 0x20000; */
14
15SECTIONS
16{
17    . = 0xc0001000;
18    . = ALIGN(4096);
19    .text :
20    {
21        KEEP(*(.text.entrypoint))       /* The entry point */
22        *(.vectors)
23        *(.text)                        /* remaining code */
24        *(.text.*)                      /* remaining code */
25
26        *(.rodata)                      /* read-only data (constants) */
27        *(.rodata*)
28        *(.glue_7)
29        *(.glue_7t)
30        *(.gnu.linkonce.t*)
31
32        /* section information for finsh shell */
33        . = ALIGN(16);
34        __fsymtab_start = .;
35        KEEP(*(FSymTab))
36        __fsymtab_end = .;
37        . = ALIGN(16);
38        __vsymtab_start = .;
39        KEEP(*(VSymTab))
40        __vsymtab_end = .;
41        . = ALIGN(16);
42
43        /* section information for initial. */
44        . = ALIGN(16);
45        __rt_init_start = .;
46        KEEP(*(SORT(.rti_fn*)))
47        __rt_init_end = .;
48        . = ALIGN(16);
49
50        /* section information for uRPC */
51        . = ALIGN(4);
52        __uRPCSvcTab_start = .;
53        KEEP(*(uRPCSvcTab))
54        __uRPCSvcTab_end = .;
55
56        . = ALIGN(16);
57        _etext = .;
58    }
59
60    .ARM.exidx : {
61        __exidx_start = .;
62        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
63        __exidx_end = .;
64    }
65
66    .eh_frame_hdr :
67    {
68         *(.eh_frame_hdr)
69         *(.eh_frame_entry)
70    }
71    .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
72
73    . = ALIGN(16);
74    .data :
75    {
76     *(.data)
77     *(.data.*)
78
79     *(.data1)
80     *(.data1.*)
81
82     . = ALIGN(16);
83     _gp = ABSOLUTE(.);     /* Base of small data */
84
85     *(.sdata)
86     *(.sdata.*)
87    }
88
89    . = ALIGN(16);
90    .ctors :
91    {
92        PROVIDE(__ctors_start__ = .);
93        KEEP(*(SORT(.ctors.*)))
94        KEEP(*(.ctors))
95        PROVIDE(__ctors_end__ = .);
96    }
97
98    .dtors :
99    {
100        PROVIDE(__dtors_start__ = .);
101        KEEP(*(SORT(.dtors.*)))
102        KEEP(*(.dtors))
103        PROVIDE(__dtors_end__ = .);
104    }
105
106    . = ALIGN(16);
107    .bss :
108    {
109        PROVIDE(__bss_start = .);
110        *(.bss)
111        *(.bss.*)
112        *(.dynbss)
113
114        *(COMMON)
115        PROVIDE(__bss_end = .);
116    }
117
118    /* Stabs debugging sections.  */
119    .stab 0 : { *(.stab) }
120    .stabstr 0 : { *(.stabstr) }
121    .stab.excl 0 : { *(.stab.excl) }
122    .stab.exclstr 0 : { *(.stab.exclstr) }
123    .stab.index 0 : { *(.stab.index) }
124    .stab.indexstr 0 : { *(.stab.indexstr) }
125    .comment 0 : { *(.comment) }
126
127    _end = .;
128
129}
130
131__bss_size = (__bss_end - __bss_start)>>3;
132