Skip to content
  • Simon Glass's avatar
    x86: Do relocation before clearing BSS · 6bda55a3
    Simon Glass authored
    
    
    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: default avatarSimon Glass <sjg@chromium.org>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
    6bda55a3