/* linker script for inteligent boot block (for user-program-mode boot-loader in flash) */ INCLUDE "h8canusb.ld-cfg" PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 ); /*PROVIDE( ___setup_board = _start);*/ STARTUP(crt0.o) INPUT(hwinit.o setup_board.o) SECTIONS { .fvector : { ___flashbb_vector = . ; LONG( ABSOLUTE( ___setup_board ) ) *(.fvector) } > flashvec .shadreg (NOLOAD) : { *(.shadreg) . = ALIGN( 0x4 ) ; } > iram0 .text : { text_start = . ; KEEP (crt0.o(.text)) . = ALIGN( 4 ) ; ___boot_fn_start = ALIGN( 0x4 ) ; KEEP (*boot_fn.o(.text)) KEEP (*boot_fn.o(.rodata)) . = ALIGN( 4 ) ; ___boot_fn_end = ALIGN( 0x4 ) ; *(.text) *(.rodata) _etext = ALIGN( 0x4 ) ; } > flashbb .tors : { ___ctors = . ; *(.ctors) ___ctors_end = . ; ___dtors = . ; *(.dtors) ___dtors_end = . ; . = ALIGN( 0x4 ) ; ___data_lma = ALIGN( 0x4 ) ; } > flashbb /*at> flashusr*/ .data : AT ( ADDR( .tors ) + SIZEOF( .tors ) ) { _data_start = . ; *(.data) . = ALIGN( 0x4 ) ; _edata = ALIGN( 0x4 ) ; } > iram1 /* ___data_lma = LOADADDR(.data) ; */ .bss : { _bss_start = ALIGN( 0x10 ) ; *(.bss) *(COMMON) . = ALIGN( 0x4 ) ; _end = . ; } > iram0 .flashusr : { _usrprog_start = . ; } > flashusr .stab 0 (NOLOAD) : { [ .stab ] } .stabstr 0 (NOLOAD) : { [ .stabstr ] } }