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