source: rtems/bsps/bfin/bf537Stamp/start/linkcmds @ 715d616

5
Last change on this file since 715d616 was 715d616, checked in by Sebastian Huber <sebastian.huber@…>, on 06/19/18 at 13:10:36

bsps: Support .rtemsstack.* linker input sections

Use a dedicated memory region or place it between the BSS and workspace.

Update #3459.

  • Property mode set to 100644
File size: 4.7 KB
Line 
1OUTPUT_FORMAT("elf32-bfin", "elf32-bfin",
2            "elf32-bfin")
3
4OUTPUT_ARCH(bfin)
5ENTRY(__start)
6STARTUP(start.o)
7
8/*
9 * Declare some sizes.
10 */
11_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
12/* bf537stamp has 64MB ram, but dynamic mmu tables have not yet been
13   implemented.  there are not enough static entries to support 64MB
14   along with banks for io and flash, so waste some RAM at the end
15   to free up mmu entries. */
16_RamSize = DEFINED(_RamSize) ? _RamSize : 0x03400000;
17_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
18_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
19
20MEMORY
21{
22      sdram(rwx)    : ORIGIN = 0x00001000, LENGTH = 0x03fff000
23/*
24      l1code(rwx)   : ORIGIN = 0xffa08000, LENGTH = 0x00008000
25      l1data(rwx)   : ORIGIN = 0xff804000, LENGTH = 0x00004000
26*/
27}
28
29SECTIONS
30{
31
32/*
33    .l1code        :
34    {
35*/
36        /*jump.o (.text)*/
37/*
38    } > l1code
39*/
40
41    .init          :
42    {
43        *(.start)
44        KEEP (*(.init))
45    } > sdram   /*=0*/
46
47    .text :
48    {
49         CREATE_OBJECT_SYMBOLS
50        *(.text)
51        *(.rodata*)
52        *(.gnu.linkonce.r*)
53       
54        /*
55         * Special FreeBSD sysctl sections.
56         */
57        . = ALIGN (16);
58        ___start_set_sysctl_set = .;
59        *(set_sysctl_*);
60        ___stop_set_sysctl_set = ABSOLUTE(.);
61        *(set_domain_*);
62        *(set_pseudo_*);
63
64         _etext = .;
65
66        ___CTOR_LIST__ = .;
67        LONG((___CTOR_END__ - ___CTOR_LIST__) / 4 - 2)
68        *(.ctors)
69        LONG(0)
70        ___CTOR_END__ = .;
71        ___DTOR_LIST__ = .;
72        LONG((___DTOR_END__ - ___DTOR_LIST__) / 4 - 2)
73        *(.dtors)
74        LONG(0)
75        ___DTOR_END__ = .;         
76    } > sdram
77
78    .tdata : {
79        __TLS_Data_begin = .;
80        *(.tdata .tdata.* .gnu.linkonce.td.*)
81        __TLS_Data_end = .;
82    } > sdram
83
84    .tbss : {
85        __TLS_BSS_begin = .;
86        *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
87        __TLS_BSS_end = .;
88    } > sdram
89
90    __TLS_Data_size = __TLS_Data_end - __TLS_Data_begin;
91    __TLS_Data_begin = __TLS_Data_size != 0 ? __TLS_Data_begin : __TLS_BSS_begin;
92    __TLS_Data_end = __TLS_Data_size != 0 ? __TLS_Data_end : __TLS_BSS_begin;
93    __TLS_BSS_size = __TLS_BSS_end - __TLS_BSS_begin;
94    __TLS_Size = __TLS_BSS_end - __TLS_Data_begin;
95    __TLS_Alignment = MAX (ALIGNOF (.tdata), ALIGNOF (.tbss));
96   
97    .fini :
98    {
99        KEEP (*(.fini))
100    } > sdram  /*=0*/
101   
102    .data :
103    {
104        *(.data)
105        KEEP (*(SORT(.rtemsrwset.*)))
106        *(.jcr)
107        *(.gnu.linkonce.d*)
108        CONSTRUCTORS
109         _edata = .;
110    } > sdram
111
112    .eh_frame : { *(.eh_frame) } > sdram
113    .data1   : { *(.data1) } > sdram
114    .eh_frame : { *(.eh_frame) } > sdram
115    .gcc_except_table : { *(.gcc_except_table*) } > sdram
116
117    .rodata :
118    {
119        *(.rodata)
120        *(.rodata.*)
121        KEEP (*(SORT(.rtemsroset.*)))
122        *(.gnu.linkonce.r*)
123    } > sdram
124
125   
126    .bss :
127    {
128         _bss_start = .;
129        _clear_start = .;
130        *(.bss)
131        *(.gnu.linkonce.b.*)
132        *(COMMON)
133        . = ALIGN (64);
134        _stack_init = .;
135        . += _StackSize;
136        _clear_end = .;
137         _end = .;
138         __end = .;
139    } > sdram
140
141    .rtemsstack (NOLOAD) : {
142        *(SORT(.rtemsstack.*))
143        _WorkAreaBase = .;
144    } > sdram
145
146/* Debugging stuff follows */
147
148  /* Stabs debugging sections.  */
149  .stab 0 : { *(.stab) }
150  .stabstr 0 : { *(.stabstr) }
151  .stab.excl 0 : { *(.stab.excl) }
152  .stab.exclstr 0 : { *(.stab.exclstr) }
153  .stab.index 0 : { *(.stab.index) }
154  .stab.indexstr 0 : { *(.stab.indexstr) }
155  .comment 0 : { *(.comment) }
156  /* DWARF debug sections.
157     Symbols in the DWARF debugging sections are relative to the beginning
158     of the section so we begin them at 0.  */
159  /* DWARF 1 */
160  .debug          0 : { *(.debug) }
161  .line           0 : { *(.line) }
162  /* GNU DWARF 1 extensions */
163  .debug_srcinfo  0 : { *(.debug_srcinfo) }
164  .debug_sfnames  0 : { *(.debug_sfnames) }
165  /* DWARF 1.1 and DWARF 2 */
166  .debug_aranges  0 : { *(.debug_aranges) }
167  .debug_pubnames 0 : { *(.debug_pubnames) }
168  /* DWARF 2 */
169  .debug_info     0 : { *(.debug_info) }
170  .debug_abbrev   0 : { *(.debug_abbrev) }
171  .debug_line     0 : { *(.debug_line) }
172  .debug_frame    0 : { *(.debug_frame) }
173  .debug_str      0 : { *(.debug_str) }
174  .debug_loc      0 : { *(.debug_loc) }
175  .debug_macinfo  0 : { *(.debug_macinfo) }
176  /* SGI/MIPS DWARF 2 extensions */
177  .debug_weaknames 0 : { *(.debug_weaknames) }
178  .debug_funcnames 0 : { *(.debug_funcnames) }
179  .debug_typenames 0 : { *(.debug_typenames) }
180  .debug_varnames  0 : { *(.debug_varnames) }
181  /*.stack 0x80000 : { _stack = .; *(.stack) }*/
182  /* These must appear regardless of  .  */   
183}
184
185__RamBase = _RamBase;
186__RamSize = _RamSize;
187__edata = _edata;
188__etext = _etext;
Note: See TracBrowser for help on using the repository browser.