]> rtime.felk.cvut.cz Git - sysless.git/blob - board/h8300/hi_cpu2/libs/hi_cpu2.ld-flashnoram
h8300: hi_cpu2 board - correct ld-scripts breakage.
[sysless.git] / board / h8300 / hi_cpu2 / libs / hi_cpu2.ld-flashnoram
1 /* linker script for applications running from FLASH */
2
3 INCLUDE "hi_cpu2.ld-cfg"
4
5 /* PROVIDE ( sym = val ); */
6
7 PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 );
8 /*PROVIDE( ___heap_end = __ram_end );*/
9 PROVIDE( ___heap_end = __iram0_end - 0x200 );
10
11 STARTUP(crt0.o)
12 INPUT(bsp0common.o)
13
14 SECTIONS
15 {
16         .text :
17         {
18           . = ALIGN( 4 ) ;
19           text_start = . ;
20           LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */
21 /*        KEEP (crt0.o(.text)) */
22           . = ALIGN( 4 ) ;
23           ___boot_fn_load = ALIGN( 0x4 ) ;
24           ___boot_fn_start = ALIGN( 0x4 ) ;
25           KEEP (*boot_fn.o(.text))
26           KEEP (*boot_fn.o(.rodata))
27           . = ALIGN( 4 ) ;
28           ___boot_fn_end = ALIGN( 0x4 ) ;
29           *(.text .stub .text.* .gnu.linkonce.t.*)
30           *(.rodata .rodata.* .gnu.linkonce.r.*)
31           . = ALIGN( 4 ) ;
32           ___nls_str_start = ALIGN( 0x4 ) ;
33           *(.nls_str)                           
34           ___nls_str_end = ALIGN( 0x4 ) ;
35           *(.strings)
36           _etext = ALIGN( 0x10 ) ;
37         } > flashusr
38
39         .shadreg (NOLOAD) :
40         {
41           *(.shadreg)
42           . = ALIGN( 0x4 ) ;
43         } > iram0
44
45         .tors : 
46         {
47           ___ctors = . ;
48           *(.ctors)
49           ___ctors_end = . ;
50           ___dtors = . ;
51           *(.dtors)
52           ___dtors_end = . ;
53           . = ALIGN( 0x10 ) ;
54           ___data_lma = ALIGN( 0x10 ) ;
55         }  > flashusr
56
57         .data :
58             AT ( ADDR( .tors ) + SIZEOF( .tors ) )
59         {
60           . = ALIGN( 0x4 ) ;
61           _data_start = ALIGN( 0x4 ) ;
62           *(.data)
63           . = ALIGN( 0x4 ) ;
64           _edata = ALIGN( 0x4 ) ;
65         } > iram0 /*at> flashusr*/
66
67         /* ___data_lma = LOADADDR(.data) ; */
68
69         .bss :
70         {
71           . = ALIGN( 0x4 ) ;
72           _bss_start = ALIGN( 0x4 ) ;
73           *(.bss)
74           *(COMMON)
75           . = ALIGN( 0x4 ) ;
76           _end = ALIGN( 0x4 ) ;
77         } > iram0
78
79         .tiny : 
80         {
81           *(.tiny)
82         }  > iram0
83         
84         .eight : 
85         {
86           *(.eight)
87         }  > eight
88
89         /* Stabs debugging sections.  */
90         .stab          0 (NOLOAD): { *(.stab) }
91         .stabstr       0 (NOLOAD): { *(.stabstr) }
92         .stab.excl     0 (NOLOAD): { *(.stab.excl) }
93         .stab.exclstr  0 (NOLOAD): { *(.stab.exclstr) }
94         .stab.index    0 (NOLOAD): { *(.stab.index) }
95         .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) }
96         .comment       0 (NOLOAD): { *(.comment) }
97         /* DWARF debug sections.
98            Symbols in the DWARF debugging sections are relative to the beginning
99            of the section so we begin them at 0.  */
100         /* DWARF 1 */
101         .debug          0 (NOLOAD): { *(.debug) }
102         .line           0 (NOLOAD): { *(.line) }
103         /* GNU DWARF 1 extensions */
104         .debug_srcinfo  0 (NOLOAD): { *(.debug_srcinfo) }
105         .debug_sfnames  0 (NOLOAD): { *(.debug_sfnames) }
106         /* DWARF 1.1 and DWARF 2 */
107         .debug_aranges  0 (NOLOAD): { *(.debug_aranges) }
108         .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) }
109         /* DWARF 2 */
110         .debug_info     0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) }
111         .debug_abbrev   0 (NOLOAD): { *(.debug_abbrev) }
112         .debug_line     0 (NOLOAD): { *(.debug_line) }
113         .debug_frame    0 (NOLOAD): { *(.debug_frame) }
114         .debug_str      0 (NOLOAD): { *(.debug_str) }
115         .debug_loc      0 (NOLOAD): { *(.debug_loc) }
116         .debug_macinfo  0 (NOLOAD): { *(.debug_macinfo) }
117         /* SGI/MIPS DWARF 2 extensions */
118         .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) }
119         .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) }
120         .debug_typenames 0 (NOLOAD): { *(.debug_typenames) }
121         .debug_varnames  0 (NOLOAD): { *(.debug_varnames) }
122         /* DWARF 3 */
123         .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) }
124         .debug_ranges   0 (NOLOAD): { *(.debug_ranges) }
125         .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) }
126 }