[U-Boot] [PATCH] efi_loader: Handle RELA absolute relocations properly

Auer, Lukas lukas.auer at aisec.fraunhofer.de
Mon Nov 5 09:40:29 UTC 2018


On Sun, 2018-11-04 at 22:28 +0100, Alexander Graf wrote:
> With RELA absolute relocations, the relocation target contains our
> link
> offset which we need to remove from the equation again. We did this
> properly in the relative relocation path, but not in the absolute
> one.
> 
> So let's do this for the absolute one as well. That way, u-boot can
> have
> a TEXT_OFFSET of != 0 and still relocate itself properly.
> 
> This fixes a bug where efi_loader did not work on the RISC-V QEMU
> port.
> With this patch, I can successfully run UEFI applications on the
> RISC-V
> QEMU port.
> 
> Reported-by: Auer, Lukas <lukas.auer at aisec.fraunhofer.de>
> Signed-off-by: Alexander Graf <agraf at suse.de>
> ---
>  lib/efi_loader/efi_runtime.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> 

Tested-by: Lukas Auer <lukas.auer at aisec.fraunhofer.de>

Thanks for the patch! That explains why it was working on the Andes
targets.

Lukas


More information about the U-Boot mailing list