lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for ARCompact
Subsystems (3)
Vineet Gupta
maintainerPATCH 1/1 lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for ARCompact
When testing Sasha's commit ca201ad6e92a "(ARC: Strip libgcc debug information when generating BTF)" ran into build failure for ARCompact builds.
pahole, uses elfutils to read DWARF for generating BTF for kernel modules. These are relocatable files so elfutils has to apply the relocations in their .debug sections and it turns out it only handles EM_ARCV2 (so ARCv2 relocations), not EM_ARC_COMPACT (ARC700) which is silently ignored to produce bogus module binaries which can ultimately lead to following errors:
Complex, interval and imaginary float types are not supported
Error while encoding BTF.
FAILED: load BTF from drivers/gpu/drm/drm_panel_orientation_quirks.ko.BTF.1: No such file or directory
As for Hexagon in commit aaa2c9a97c22 ("lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for Hexagon"), don't allow DEBUG_INFO_BTF on ARCompact. BTF is unlikely to be wanted on these older cores anyway.
Tested with elfutils 0.194 and pahole 1.31.
--- lib/Kconfig.debug | 2 ++ 1 file changed, 2 insertions(+)
lib/Kconfig.debug +2 -0
@@ -403,6 +403,8 @@ config DEBUG_INFO_BTF depends on PAHOLE_VERSION >= 122 # pahole uses elfutils, which does not have support for Hexagon relocations depends on !HEXAGON + # elfutils only handles ARCv2 relocations, not ARCompact ones + depends on !ISA_ARCOMPACT help Generate deduplicated BTF type information from DWARF debug info. Turning this on requires pahole v1.22 or later, which will convert
Signature · 1 line
2.53.0