mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vineet Gupta <vgupta@kernel.org>
To: bpf@vger.kernel.org, linux-snps-arc@lists.infradead.org
Cc: Alan Maguire <alan.maguire@oracle.com>,
	Sasha Levin <sashal@kernel.org>,
	Andrii Nakryiko <andrii@kernel.org>,
	linux-kernel@vger.kernel.org, Vineet Gupta <vgupta@kernel.org>
Subject: [PATCH] lib/Kconfig.debug: disable CONFIG_DEBUG_INFO_BTF for ARCompact
Date: Sun,  1 Nov 2026 18:36:37 -0800	[thread overview]
Message-ID: <20261102023638.1621622-1-vgupta@kernel.org> (raw)

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.

Signed-off-by: Vineet Gupta <vgupta@kernel.org>
Assisted-by: Claude:claude-opus-5
---
 lib/Kconfig.debug | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 2d22638ec13a..5331c3649228 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -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
-- 
2.53.0


                 reply	other threads:[~2026-11-02  2:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261102023638.1621622-1-vgupta@kernel.org \
    --to=vgupta@kernel.org \
    --cc=alan.maguire@oracle.com \
    --cc=andrii@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=sashal@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®