EFI boot fails when CONFIG_DEBUG_INFO_BTF=y on arm64
Hi,
We have boot test using OVMF/AAVMF EFI firmware on aarch64 in qemu. When we try to build kernel with `CONFIG_DEBUG_INFO_BTF=y' (pahole v1.20) previously successful EFI boot test fails with:
EFI stub: ERROR: Failed to relocate kernel
EFI stub: ERROR: Failed to relocate kernel
Without EFI it boots normally. On other our architectures (such as arm32, i586, powerpc, x86_64) it boots normally too (all without EFI boot, but x86_64 is also successfully tested with OVMF EFI boot).
This is tested on 5.4.97, but I can try 5.10.15 if needed.
Thanks,
Quoted 7 lines · Vitaly Chikunov
Hi,
We have boot test using OVMF/AAVMF EFI firmware on aarch64 in qemu. When we try to build kernel with `CONFIG_DEBUG_INFO_BTF=y' (pahole v1.20) previously successful EFI boot test fails with:
Quoted 6 lines
EFI stub: ERROR: Failed to relocate kernel
EFI stub: ERROR: Failed to relocate kernelWithout EFI it boots normally. On other our architectures (such as arm32, i586, powerpc,
x86_64) it boots normally too (all without EFI boot, butx86_64is also successfully tested with OVMF EFI boot).
So this seems like an arm64-specific issue? Is it possible to get any help from someone familiar with arm64 specifics to find out what exactly causes this problem? We use pahole -J to "implant" .BTF into vmlinux.o, but later rely on vmlinux loader scripts to have a loadable .BTF section. The problem might happen somewhere along those steps. I don't think I can be of much help here without a bit more information (and seems like no one else on this list came up with any suggestions as well).
Quoted 5 lines
This is tested on 5.4.97, but I can try 5.10.15 if needed.
Thanks,
Andrii,
Quoted 15 lines · Andrii Nakryiko
Quoted 7 lines · Vitaly Chikunov
Hi,
We have boot test using OVMF/AAVMF EFI firmware on aarch64 in qemu. When we try to build kernel with `CONFIG_DEBUG_INFO_BTF=y' (pahole v1.20) previously successful EFI boot test fails with:
Quoted 6 lines
EFI stub: ERROR: Failed to relocate kernel
EFI stub: ERROR: Failed to relocate kernelWithout EFI it boots normally. On other our architectures (such as arm32, i586, powerpc,
x86_64) it boots normally too (all without EFI boot, butx86_64is also successfully tested with OVMF EFI boot).
Quoted 8 lines
So this seems like an arm64-specific issue? Is it possible to get any help from someone familiar with arm64 specifics to find out what exactly causes this problem? We use
pahole -Jto "implant" .BTF into vmlinux.o, but later rely on vmlinux loader scripts to have a loadable .BTF section. The problem might happen somewhere along those steps. I don't think I can be of much help here without a bit more information (and seems like no one else on this list came up with any suggestions as well).
Thanks for the reply! After some experiments and debugging today it's turned out that problem is low default memory size for qemu. When increased to -m 512 it booted good. Thereby, now we can enable BTF for aarch64 too.
Vitaly,
Quoted 6 lines
Quoted 6 lines
This is tested on 5.4.97, but I can try 5.10.15 if needed.
Thanks,