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