summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Schocher <hs@denx.de>2010-10-11 14:08:14 +0200
committerWolfgang Denk <wd@denx.de>2010-10-13 10:12:01 +0200
commit9710504d200599a6e7e7ac0046adca43cfccaf0f (patch)
treeb9c02af8426938a33e92956fa5a1b46d7c0881c9
parent4a8fd13af82b7b37099fea3d12ea52e5bcc151a5 (diff)
downloadblackbird-obmc-uboot-9710504d200599a6e7e7ac0046adca43cfccaf0f.tar.gz
blackbird-obmc-uboot-9710504d200599a6e7e7ac0046adca43cfccaf0f.zip
arm926ejs, tx25: add support for ELF relocations
Signed-off-by: Heiko Schocher <hs@denx.de>
-rw-r--r--arch/arm/config.mk2
-rw-r--r--arch/arm/cpu/arm926ejs/start.S8
-rw-r--r--board/karo/tx25/config.mk2
-rw-r--r--include/configs/tx25.h2
-rw-r--r--nand_spl/board/karo/tx25/u-boot.lds13
5 files changed, 21 insertions, 6 deletions
diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0be47d3c42..21c1e33e67 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -70,5 +70,7 @@ LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds
ifndef CONFIG_SYS_ARM_WITHOUT_RELOC
# needed for relocation
+ifndef CONFIG_NAND_SPL
PLATFORM_LDFLAGS += -pie
endif
+endif
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S
index 49ca839a43..e882487c25 100644
--- a/arch/arm/cpu/arm926ejs/start.S
+++ b/arch/arm/cpu/arm926ejs/start.S
@@ -279,10 +279,10 @@ clbss_l:str r2, [r0] /* clear loop... */
*/
#ifdef CONFIG_NAND_SPL
ldr r0, _nand_boot_ofs
- adr r1, _start
- add pc, r0, r1
-_nand_boot_ofs
- : .word nand_boot - _start
+ mov pc, r0
+
+_nand_boot_ofs:
+ .word nand_boot
#else
ldr r0, _board_init_r_ofs
adr r1, _start
diff --git a/board/karo/tx25/config.mk b/board/karo/tx25/config.mk
index 51ca1ab0f0..8be6466b5a 100644
--- a/board/karo/tx25/config.mk
+++ b/board/karo/tx25/config.mk
@@ -1,5 +1,5 @@
ifdef CONFIG_NAND_SPL
TEXT_BASE = 0x810c0000
else
-TEXT_BASE = 0x81fc0000
+TEXT_BASE = 0x81200000
endif
diff --git a/include/configs/tx25.h b/include/configs/tx25.h
index bcc8140df0..996afa3b07 100644
--- a/include/configs/tx25.h
+++ b/include/configs/tx25.h
@@ -41,7 +41,7 @@
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x800
#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x30000
-#define CONFIG_SYS_NAND_U_BOOT_DST (0x81fc0000)
+#define CONFIG_SYS_NAND_U_BOOT_DST (0x81200000)
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
diff --git a/nand_spl/board/karo/tx25/u-boot.lds b/nand_spl/board/karo/tx25/u-boot.lds
index c572557535..5f95c874f6 100644
--- a/nand_spl/board/karo/tx25/u-boot.lds
+++ b/nand_spl/board/karo/tx25/u-boot.lds
@@ -53,6 +53,11 @@ SECTIONS
*(.data.rel.ro)
}
+ . = ALIGN(4);
+ __rel_dyn_start = .;
+ __rel_dyn_end = .;
+ __dynsym_start = .;
+
__got_start = .;
. = ALIGN(4);
.got : { *(.got) }
@@ -67,4 +72,12 @@ SECTIONS
__bss_start = .;
.bss : { *(.bss) }
_end = .;
+ /DISCARD/ : { *(.bss*) }
+ /DISCARD/ : { *(.dynstr*) }
+ /DISCARD/ : { *(.dynsym*) }
+ /DISCARD/ : { *(.dynamic*) }
+ /DISCARD/ : { *(.hash*) }
+ /DISCARD/ : { *(.plt*) }
+ /DISCARD/ : { *(.interp*) }
+ /DISCARD/ : { *(.gnu*) }
}
OpenPOWER on IntegriCloud