diff options
author | Albert Aribaud <albert.aribaud@free.fr> | 2010-10-11 13:13:28 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-10-13 10:10:21 +0200 |
commit | 92d5ecba47feb9961c3b7525e947866c5f0d2de5 (patch) | |
tree | fd0917489d0f6c5b55bc5b32fe1e7247c6817f73 /arch/arm/lib | |
parent | 89bca0ab697fc75160dd0d685d7cb2ed26609a6d (diff) | |
download | u-boot-imx-92d5ecba47feb9961c3b7525e947866c5f0d2de5.zip u-boot-imx-92d5ecba47feb9961c3b7525e947866c5f0d2de5.tar.gz u-boot-imx-92d5ecba47feb9961c3b7525e947866c5f0d2de5.tar.bz2 |
arm: implement ELF relocations
ELF relocation tables generated with linker option -pie can
be used to fixup code and data in a single loop at relocation,
removing the need for manual fixups anywhere else in the code.
Signed-off-by: Albert Aribaud <albert.aribaud@free.fr>
Diffstat (limited to 'arch/arm/lib')
-rw-r--r-- | arch/arm/lib/board.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c index 5f2dfd0..e411d93 100644 --- a/arch/arm/lib/board.c +++ b/arch/arm/lib/board.c @@ -147,7 +147,7 @@ static int display_banner (void) #else _armboot_start, #endif - _bss_start, _bss_end); + _bss_start_ofs+_TEXT_BASE, _bss_end_ofs+_TEXT_BASE); #ifdef CONFIG_MODEM_SUPPORT debug ("Modem Support enabled\n"); #endif @@ -517,7 +517,7 @@ void board_init_f (ulong bootflag) memset ((void*)gd, 0, sizeof (gd_t)); - gd->mon_len = _bss_end - _TEXT_BASE; + gd->mon_len = _bss_end_ofs; for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { if ((*init_fnc_ptr)() != 0) { @@ -679,6 +679,7 @@ static char *failed = "*** failed ***\n"; * ************************************************************************ */ + void board_init_r (gd_t *id, ulong dest_addr) { char *s; @@ -702,7 +703,7 @@ void board_init_r (gd_t *id, ulong dest_addr) gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ - monitor_flash_len = _bss_start - _TEXT_BASE; + monitor_flash_len = _bss_start_ofs; debug ("monitor flash len: %08lX\n", monitor_flash_len); board_init(); /* Setup chipselects */ @@ -914,6 +915,7 @@ extern void davinci_eth_set_mac_addr (const u_int8_t *addr); /* NOTREACHED - no way out of command loop except booting */ } + #endif /* defined(CONFIG_SYS_ARM_WITHOUT_RELOC) */ void hang (void) |