Include board-specific file from the u-boot ldscript, to allow linking to different load addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32207 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2009-08-08 16:02:34 +00:00
parent b2c9ef19dd
commit e60a2810f6
4 changed files with 22 additions and 3 deletions

View File

@ -22,6 +22,11 @@ local librootFunctions =
strtol.o strtol.o
; ;
local extraLinkerArgs = ;
if $(TARGET_BOOT_BOARD) {
extraLinkerArgs += -L$(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/board/$(TARGET_BOOT_BOARD) ;
}
AddResources haiku_loader : boot_loader.rdef ; AddResources haiku_loader : boot_loader.rdef ;
KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) : KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
@ -45,7 +50,7 @@ KernelLd boot_loader_$(TARGET_BOOT_PLATFORM) :
$(librootFunctions:G=src!system!kernel!lib) $(librootFunctions:G=src!system!kernel!lib)
: $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld : $(HAIKU_TOP)/src/system/ldscripts/$(TARGET_ARCH)/boot_loader_$(TARGET_BOOT_PLATFORM).ld
: -Bstatic : -Bstatic $(extraLinkerArgs)
; ;
rule BuildCoffLoader { rule BuildCoffLoader {

View File

@ -0,0 +1,6 @@
/*
* Gumstix Overo ld definitions
*/
BOARD_LOADER_BASE = 0x80008000 ;
#error

View File

@ -0,0 +1,6 @@
/*
* Gumstix Verdex ld definitions
*/
BOARD_LOADER_BASE = 0xa2000000 ;

View File

@ -1,11 +1,13 @@
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
/* include board-specific definitions */
INCLUDE board.ld
ENTRY(_start) ENTRY(_start)
SECTIONS SECTIONS
{ {
/* . = 0x80008000; */ . = BOARD_LOADER_BASE;
. = 0xa2000000;
/* text/read-only data */ /* text/read-only data */
.text : { *(.text .gnu.linkonce.t.*) } .text : { *(.text .gnu.linkonce.t.*) }