1/*
2 * Copyright (c) 2006-2023, RT-Thread Development Team
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 * Change Logs:
7 * Date           Author       Notes
8 * 2019-12-04     Jiaxun Yang  Initial version
9 */
10
11OUTPUT_ARCH(mips)
12GROUP(-lgcc -lc)
13
14ENTRY(_start)
15SECTIONS
16{
17    . = 0x80000000 ;
18    .text :
19    {
20        __ebase_entry = .;
21        KEEP(*(.exc_vectors))
22        __ebase_end = .;
23        start = .;
24        *(.start);
25            . = ALIGN(4);
26            *(.text)
27            *(.text.*)
28            *(.rodata)
29            *(.rodata.*)
30            *(.rodata1)
31            *(.rodata1.*)
32
33
34            /* section information for finsh shell */
35            . = ALIGN(4);
36            __fsymtab_start = .;
37            KEEP(*(FSymTab))
38            __fsymtab_end = .;
39            . = ALIGN(4);
40            __vsymtab_start = .;
41            KEEP(*(VSymTab))
42            __vsymtab_end = .;
43            . = ALIGN(4);
44
45            . = ALIGN(4);
46            __rt_init_start = .;
47            KEEP(*(SORT(.rti_fn*)))
48            __rt_init_end = .;
49            . = ALIGN(4);
50
51            . = ALIGN(4);
52        __rt_utest_tc_tab_start = .;
53        KEEP(*(UtestTcTab))
54        __rt_utest_tc_tab_end = .;
55        . = ALIGN(4);
56    }
57
58    .eh_frame_hdr :
59    {
60         *(.eh_frame_hdr)
61         *(.eh_frame_entry)
62    }
63    .eh_frame : ONLY_IF_RO { KEEP (*(.eh_frame)) }
64
65    . = ALIGN(4);
66    .data :
67    {
68         *(.data)
69         *(.data.*)
70
71         *(.data1)
72         *(.data1.*)
73
74         . = ALIGN(8);
75         _gp = ABSOLUTE(.);     /* Base of small data */
76
77         *(.sdata)
78         *(.sdata.*)
79    }
80
81    .stack :
82    {
83        . = ALIGN(8);
84        _system_stack_start = .;
85        . = . + 0x1000;
86        _system_stack = .;
87    }
88
89    .sbss :
90    {
91        __bss_start = .;
92        *(.sbss)
93        *(.sbss.*)
94        *(.dynsbss)
95        *(.scommon)
96    }
97
98    .bss :
99    {
100        *(.bss)
101        *(.bss.*)
102        *(.dynbss)
103        *(COMMON)
104        __bss_end = .;
105    }
106    _end = .;
107
108    /* Stabs debugging sections.  */
109    .stab          0 : { *(.stab) }
110    .stabstr       0 : { *(.stabstr) }
111    .stab.excl     0 : { *(.stab.excl) }
112    .stab.exclstr  0 : { *(.stab.exclstr) }
113    .stab.index    0 : { *(.stab.index) }
114    .stab.indexstr 0 : { *(.stab.indexstr) }
115    .comment       0 : { *(.comment) }
116    /* DWARF debug sections.
117     * Symbols in the DWARF debugging sections are relative to the beginning
118     * of the section so we begin them at 0.  */
119    /* DWARF 1 */
120    .debug          0 : { *(.debug) }
121    .line           0 : { *(.line) }
122    /* GNU DWARF 1 extensions */
123    .debug_srcinfo  0 : { *(.debug_srcinfo) }
124    .debug_sfnames  0 : { *(.debug_sfnames) }
125    /* DWARF 1.1 and DWARF 2 */
126    .debug_aranges  0 : { *(.debug_aranges) }
127    .debug_pubnames 0 : { *(.debug_pubnames) }
128    /* DWARF 2 */
129    .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
130    .debug_abbrev   0 : { *(.debug_abbrev) }
131    .debug_line     0 : { *(.debug_line) }
132    .debug_frame    0 : { *(.debug_frame) }
133    .debug_str      0 : { *(.debug_str) }
134    .debug_loc      0 : { *(.debug_loc) }
135    .debug_macinfo  0 : { *(.debug_macinfo) }
136    /* SGI/MIPS DWARF 2 extensions */
137    .debug_weaknames 0 : { *(.debug_weaknames) }
138    .debug_funcnames 0 : { *(.debug_funcnames) }
139    .debug_typenames 0 : { *(.debug_typenames) }
140    .debug_varnames  0 : { *(.debug_varnames) }
141}
142