Skip to contentSkip to conversation

lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for ARCompact

PATCH New Vineet Gupta 1 participant 1 message Nov 2

Subsystems (3)
lore
Share & tools
lore

Vineet Gupta

author maintainer
#0 lore raw

PATCH 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.

Assisted-by Claude:claude-opus-5
---
 lib/Kconfig.debug | 2 ++
 1 file changed, 2 insertions(+)
lib/Kconfig.debug +2 -0
index 2d22638ec13a..5331c3649228 100644
@@ -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