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