]> rtime.felk.cvut.cz Git - sysless.git/blob - board/h8canusb/libs/edk2638.ld-boot
Initial import.
[sysless.git] / board / h8canusb / libs / edk2638.ld-boot
1 /* linker script for inteligent boot block */
2
3 INCLUDE "edk2638.ld-cfg"
4
5 PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 );
6
7 /* STARTUP(crt0.o) */
8
9 SECTIONS
10 {
11         .fvector :
12         {
13           ___flashbb_vector = . ;
14           LONG( ABSOLUTE( _start ) )
15           *(.fvector)
16         } > flashvec
17         
18         .text :
19         {
20           text_start = . ;
21           KEEP (crt0*(.text))
22           . = ALIGN( 4 ) ;
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)
29           *(.rodata)                            
30           *(.strings)
31           . = ALIGN( 0x4 ) ;
32           _etext = ALIGN( 0x4 ) ;
33         } > flashbb
34
35         .tors : 
36         {
37           ___ctors = . ;
38           *(.ctors)
39           ___ctors_end = . ;
40           ___dtors = . ;
41           *(.dtors)
42           ___dtors_end = . ;
43           . = ALIGN( 0x4 ) ;
44           ___data_lma = ALIGN( 0x4 ) ;
45         }  > flashbb /*at> flashusr*/
46
47         .data :
48           AT ( ADDR( .tors ) + SIZEOF( .tors ) )
49         {
50           _data_start = . ;
51           *(.data)
52           . = ALIGN( 0x4 ) ;
53           _edata = ALIGN( 0x4 ) ;
54         } > iram1
55
56         /* ___data_lma = LOADADDR(.data) ; */
57         
58         .bss :
59         {
60           _bss_start = ALIGN( 0x10 ) ;
61           *(.bss)
62           *(COMMON)
63           . = ALIGN( 0x4 ) ;
64           _end = . ;
65         } > iram0
66         
67         .flashusr :
68         {
69           _usrprog_start = . ;
70         } > flashusr
71
72         .stab  0 (NOLOAD) : 
73         {
74           [ .stab ]
75         }
76
77         .stabstr  0 (NOLOAD) :
78         {
79           [ .stabstr ]
80         }
81 }