/* linker script for inteligent boot block (for user-program-mode boot-loader in flash) */ INCLUDE "hi_cpu2.ld-cfg" PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 ); /*PROVIDE( ___setup_board = _start);*/ STARTUP(crt0.o) INPUT(bsp0common.o) INPUT(bsp0hwinit.o setup_board.o) SECTIONS { .fvector : { ___flashbb_vector = . ; LONG( ABSOLUTE( ___setup_board ) ) *(.fvector) } > flashvec .shadreg (NOLOAD) : { *(.shadreg) . = ALIGN( 0x4 ) ; } > iram0 .text.boot_fn ALIGN(4) : { . = ALIGN( 0x4 ) ; KEEP (boot_fn.o(.text)) KEEP (boot_fn.o(.rodata)) KEEP (boot_fn.o(.strings)) . = ALIGN( 4 ) ; } > iram0 AT>flashbb ___boot_fn_start = ADDR(.text.boot_fn); ___boot_fn_end = ADDR(.text.boot_fn) + SIZEOF(.text.boot_fn); ___boot_fn_load = LOADADDR(.text.boot_fn); .text : { text_start = . ; KEEP (crt0.o(.text)) *(.text) *(.rodata) *(.text .stub .text.* .gnu.linkonce.t.*) *(.rodata .rodata.* .gnu.linkonce.r.*) *(.strings) . = ALIGN( 0x4 ) ; _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 ) ) { . = ALIGN( 0x4 ) ; _data_start = ALIGN( 0x4 ) ; *(.data) . = ALIGN( 0x4 ) ; _edata = ALIGN( 0x4 ) ; } > iram1 /* ___data_lma = LOADADDR(.data) ; */ .bss : { . = ALIGN( 0x4 ) ; _bss_start = ALIGN( 0x4 ) ; *(.bss) *(COMMON) . = ALIGN( 0x4 ) ; _end = . ; } > iram0 .flashusr : { _usrprog_start = . ; } > flashusr /* Stabs debugging sections. */ .stab 0 (NOLOAD): { *(.stab) } .stabstr 0 (NOLOAD): { *(.stabstr) } .stab.excl 0 (NOLOAD): { *(.stab.excl) } .stab.exclstr 0 (NOLOAD): { *(.stab.exclstr) } .stab.index 0 (NOLOAD): { *(.stab.index) } .stab.indexstr 0 (NOLOAD): { *(.stab.indexstr) } .comment 0 (NOLOAD): { *(.comment) } /* DWARF debug sections. Symbols in the DWARF debugging sections are relative to the beginning of the section so we begin them at 0. */ /* DWARF 1 */ .debug 0 (NOLOAD): { *(.debug) } .line 0 (NOLOAD): { *(.line) } /* GNU DWARF 1 extensions */ .debug_srcinfo 0 (NOLOAD): { *(.debug_srcinfo) } .debug_sfnames 0 (NOLOAD): { *(.debug_sfnames) } /* DWARF 1.1 and DWARF 2 */ .debug_aranges 0 (NOLOAD): { *(.debug_aranges) } .debug_pubnames 0 (NOLOAD): { *(.debug_pubnames) } /* DWARF 2 */ .debug_info 0 (NOLOAD): { *(.debug_info .gnu.linkonce.wi.*) } .debug_abbrev 0 (NOLOAD): { *(.debug_abbrev) } .debug_line 0 (NOLOAD): { *(.debug_line) } .debug_frame 0 (NOLOAD): { *(.debug_frame) } .debug_str 0 (NOLOAD): { *(.debug_str) } .debug_loc 0 (NOLOAD): { *(.debug_loc) } .debug_macinfo 0 (NOLOAD): { *(.debug_macinfo) } /* SGI/MIPS DWARF 2 extensions */ .debug_weaknames 0 (NOLOAD): { *(.debug_weaknames) } .debug_funcnames 0 (NOLOAD): { *(.debug_funcnames) } .debug_typenames 0 (NOLOAD): { *(.debug_typenames) } .debug_varnames 0 (NOLOAD): { *(.debug_varnames) } /* DWARF 3 */ .debug_pubtypes 0 (NOLOAD): { *(.debug_pubtypes) } .debug_ranges 0 (NOLOAD): { *(.debug_ranges) } .gnu.attributes 0 (NOLOAD): { KEEP (*(.gnu.attributes)) } }