From: Michal Sojka Date: Mon, 25 Jul 2005 08:06:00 +0000 (+0000) Subject: Fixed ld scripts by adding a jump to _start. X-Git-Url: http://rtime.felk.cvut.cz/gitweb/sysless.git/commitdiff_plain/1268fb91f869b8bb933516ede1a9c787a72bcb65 Fixed ld scripts by adding a jump to _start. darcs-hash:20050725080605-f2ef6-bcdea97cab289e85b48338a30fcc4d6db8acd87d.gz --- diff --git a/board/h8300/h8canusb/libs/Makefile.omk b/board/h8300/h8canusb/libs/Makefile.omk index 74e8d66..0915604 100644 --- a/board/h8300/h8canusb/libs/Makefile.omk +++ b/board/h8300/h8canusb/libs/Makefile.omk @@ -1,3 +1,3 @@ # -*- makefile -*- lib_LDSCRIPTS = $(notdir $(wildcard $(SOURCES_DIR)/*.ld*)) -ldscript_ADD_PREFIX_PATH = crt0\.o +# ldscript_ADD_PREFIX_PATH = crt0\.o diff --git a/board/h8300/h8canusb/libs/edk2638.ld-boot b/board/h8300/h8canusb/libs/edk2638.ld-boot index cfa2064..055128c 100644 --- a/board/h8300/h8canusb/libs/edk2638.ld-boot +++ b/board/h8300/h8canusb/libs/edk2638.ld-boot @@ -4,7 +4,7 @@ INCLUDE "edk2638.ld-cfg" PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 ); -/* STARTUP(crt0.o) */ +STARTUP(crt0.o) SECTIONS { diff --git a/board/h8300/h8canusb/libs/edk2638.ld-flash b/board/h8300/h8canusb/libs/edk2638.ld-flash index dabbef6..260277c 100644 --- a/board/h8300/h8canusb/libs/edk2638.ld-flash +++ b/board/h8300/h8canusb/libs/edk2638.ld-flash @@ -7,14 +7,16 @@ INCLUDE "edk2638.ld-cfg" PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 ); PROVIDE( ___heap_end = __ram_end ); -/* STARTUP(crt0.o) */ +STARTUP(crt0.o) SECTIONS { .text : { + . = ALIGN( 4 ) ; text_start = . ; - KEEP (crt0*(.text)) + LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */ +/* KEEP (crt0.o(.text)) */ . = ALIGN( 4 ) ; ___boot_fn_start = ALIGN( 0x4 ) ; KEEP (*boot_fn.o(.text)) diff --git a/board/h8300/h8canusb/libs/edk2638.ld-ram b/board/h8300/h8canusb/libs/edk2638.ld-ram index bb2d7ba..943ce84 100644 --- a/board/h8300/h8canusb/libs/edk2638.ld-ram +++ b/board/h8300/h8canusb/libs/edk2638.ld-ram @@ -9,14 +9,16 @@ INCLUDE "edk2638.ld-cfg" PROVIDE( ___stack_top = ( __iram0_end & ~ 3 ) - 4 ); PROVIDE( ___heap_end = __ram_end ); -/* STARTUP(crt0.o) */ +STARTUP(crt0.o) SECTIONS { .text : { + . = ALIGN( 4 ) ; text_start = . ; - KEEP (crt0*(.text)) + LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */ +/* KEEP (crt0.o(.text)) */ . = ALIGN( 4 ) ; ___boot_fn_start = ALIGN( 0x4 ) ; KEEP (*boot_fn.o(.text)) diff --git a/board/h8300/h8canusb/libs/id_cpu1.ld-flash b/board/h8300/h8canusb/libs/id_cpu1.ld-flash index 2d6cac4..3a915ea 100644 --- a/board/h8300/h8canusb/libs/id_cpu1.ld-flash +++ b/board/h8300/h8canusb/libs/id_cpu1.ld-flash @@ -13,8 +13,10 @@ SECTIONS { .text : { + . = ALIGN( 4 ) ; text_start = . ; - KEEP (crt0.o(.text)) + LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */ +/* KEEP (crt0.o(.text)) */ . = ALIGN( 4 ) ; ___boot_fn_start = ALIGN( 0x4 ) ; KEEP (*boot_fn.o(.text)) diff --git a/board/h8300/h8canusb/libs/id_cpu1.ld-ram b/board/h8300/h8canusb/libs/id_cpu1.ld-ram index 16d8bd0..e562810 100644 --- a/board/h8300/h8canusb/libs/id_cpu1.ld-ram +++ b/board/h8300/h8canusb/libs/id_cpu1.ld-ram @@ -15,8 +15,10 @@ SECTIONS { .text : { + . = ALIGN( 4 ) ; text_start = . ; - KEEP (crt0.o(.text)) + LONG( ABSOLUTE( _start ) + 0x5a000000 ) /* JMP _start */ +/* KEEP (crt0.o(.text)) */ . = ALIGN( 4 ) ; ___boot_fn_start = ALIGN( 0x4 ) ; KEEP (*boot_fn.o(.text))