[U-Boot] [PATCH v3 27/62] x86: Do relocation before clearing BSS

Bin Meng bmeng.cn at gmail.com
Tue Jan 17 03:58:41 CET 2017


On Mon, Jan 16, 2017 at 10:03 PM, Simon Glass <sjg at chromium.org> wrote:
> 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 at chromium.org>
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> Changes in v3: None
> Changes in v2: None
>
>  common/board_f.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

applied to u-boot-x86, thanks!


More information about the U-Boot mailing list