summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-01-16 14:03:52 (GMT)
committerBin Meng <bmeng.cn@gmail.com>2017-02-06 03:38:46 (GMT)
commit6bda55a38ce4d9c5fcab5a5011e06469662954b3 (patch)
tree21ff947c3d1eeb0e71d6bf4ffaebeeb5d581cabc /common
parentfb92308b983d54f6275ae0ced0e6930dfcc5bdec (diff)
downloadu-boot-6bda55a38ce4d9c5fcab5a5011e06469662954b3.tar.xz
x86: Do relocation before clearing BSS
The BSS region may overlap with relocations. If we clear BSS we will overwrite the start of the relocation area. This doesn't matter when running from SPI flash, since it is read-only. But when relocating 64-bit U-Boot from one place in RAM to another, relocation will fail because some of its relocations have been zeroed. To fix this, put the ELF fixup call before the BSS clearing call. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 62cdd8c..ae6cd85 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -1033,8 +1033,8 @@ static const init_fnc_t init_sequence_f[] = {
setup_reloc,
#if defined(CONFIG_X86) || defined(CONFIG_ARC)
copy_uboot_to_ram,
- clear_bss,
do_elf_reloc_fixups,
+ clear_bss,
#endif
#if defined(CONFIG_XTENSA)
clear_bss,