]> git.sur5r.net Git - u-boot/commitdiff
arm926ejs, tx25: add support for ELF relocations
authorHeiko Schocher <hs@denx.de>
Mon, 11 Oct 2010 12:08:14 +0000 (14:08 +0200)
committerWolfgang Denk <wd@denx.de>
Wed, 13 Oct 2010 08:12:01 +0000 (10:12 +0200)
Signed-off-by: Heiko Schocher <hs@denx.de>
arch/arm/config.mk
arch/arm/cpu/arm926ejs/start.S
board/karo/tx25/config.mk
include/configs/tx25.h
nand_spl/board/karo/tx25/u-boot.lds

index 0be47d3c42e41a0e662ff3599a03fea9f247b5ce..21c1e33e6743be469febfdc66925e6d2e45d2904 100644 (file)
@@ -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
index 49ca839a431a19e606d78dfe0302684ee8349b33..e882487c25a86d62eba748807b953e786b309142 100644 (file)
@@ -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
index 51ca1ab0f0d0d14495596e18f990f386ae9c3660..8be6466b5a873eca85a70cd6affe031dbf45bda6 100644 (file)
@@ -1,5 +1,5 @@
 ifdef CONFIG_NAND_SPL
 TEXT_BASE = 0x810c0000
 else
-TEXT_BASE = 0x81fc0000
+TEXT_BASE = 0x81200000
 endif
index bcc8140df0db0a8ffcbbda6f903ba717fae79a4b..996afa3b0706b3f066fed214f25bcd70a397df5e 100644 (file)
@@ -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
index c57255753555f48609d38921b6963445fd948cdd..5f95c874f6e972d117fa2d08a51434d058cb9e5a 100644 (file)
@@ -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*) }
 }