Skip to content
Commit afdc4fcc authored by Alexander Graf's avatar Alexander Graf
Browse files

efi_loader: Handle RELA absolute relocations properly



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: default avatarAuer, Lukas <lukas.auer@aisec.fraunhofer.de>
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarLukas Auer <lukas.auer@aisec.fraunhofer.de>
parent 4aa74926
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment