Skip to content

EFI stub booting fails with ld.lld: __efistub__end miscalculated #634

@kees

Description

@kees

Building latest LLVM and v5.3-rc1, I'm seeing:

ld.lld: error: /home/kees/src/linux/drivers/firmware/efi/libstub/arm64-stub.c:134:(.init.text+0x70): relocation R_AARCH64_ADR_PREL_PG_HI21 out of range: -70505092558848 is not in [-4294967296, 4294967295]

line 134 is:
*reserve_size = round_up(kernel_memsize, EFI_ALLOC_ALIGN);

This is only visible if I disable CONFIG_ARM64_ERRATUM_843419. If I leave this enabled, the EFI stub fails to boot the kernel, with handle_kernel_image() failing...

Metadata

Metadata

Assignees

Labels

[ARCH] arm64This bug impacts ARCH=arm64[BUG] linuxA bug that should be fixed in the mainline kernel.[BUG] llvmA bug that should be fixed in upstream LLVM[FIXED][LLVM] 10This bug was fixed in LLVM 10.0[TOOL] lldThe issue is relevant to LLD linker

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions