source: rtems/bsps/bfin/eZKit533/start/linkcmds @ 5ed00353

Last change on this file since 5ed00353 was 5ed00353, checked in by Sebastian Huber <sebastian.huber@…>, on 07/14/22 at 12:41:03

bsps: Sort .noinit* sections

Sort the .noinit* input sections by name first, then by alignment if two
sections have the same name. This allows the placement of begin/end symbols to
initialize some areas with a special value.

Update #4678.

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