From: Nathan Chancellor <nathan@kernel.org>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Vishal Chourasia <vishalc@linux.ibm.com>,
Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH] powerpc/vmlinux.lds: Drop .interp description
Date: Sat, 18 Oct 2025 18:52:40 +0100 [thread overview]
Message-ID: <20251018-ppc-fix-lld-interp-v1-1-a083de6dccc9@kernel.org> (raw)
Commit da30705c4621 ("arch/powerpc: Remove .interp section in vmlinux")
intended to drop the .interp section from vmlinux but even with this
change, relocatable kernels linked with ld.lld contain an empty .interp
section, which ends up causing crashes in GDB [1].
$ make -skj"$(nproc)" ARCH=powerpc LLVM=1 clean pseries_le_defconfig vmlinux
$ llvm-readelf -S vmlinux | grep interp
[44] .interp PROGBITS c0000000021ddb34 21edb34 000000 00 A 0 0 1
There appears to be a subtle difference between GNU ld and ld.lld when
it comes to discarding sections that specify load addresses [2].
Since '--no-dynamic-linker' prevents emission of the .interp section,
there is no need to describe it in the output sections of the vmlinux
linker script. Drop the .interp section description from vmlinux.lds.S
to avoid this issue altogether.
Link: https://sourceware.org/bugzilla/show_bug.cgi?id=33481 [1]
Link: https://github.com/ClangBuiltLinux/linux/issues/2137 [2]
Reported-by: Vishal Chourasia <vishalc@linux.ibm.com>
Closes: https://lore.kernel.org/20251013040148.560439-1-vishalc@linux.ibm.com/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
---
arch/powerpc/kernel/vmlinux.lds.S | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index de6ee7d35cff..15850296c0a9 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -330,7 +330,6 @@ SECTIONS
}
.hash : AT(ADDR(.hash) - LOAD_OFFSET) { *(.hash) }
.gnu.hash : AT(ADDR(.gnu.hash) - LOAD_OFFSET) { *(.gnu.hash) }
- .interp : AT(ADDR(.interp) - LOAD_OFFSET) { *(.interp) }
.rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET)
{
__rela_dyn_start = .;
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251018-ppc-fix-lld-interp-1a78c361cd42
Best regards,
--
Nathan Chancellor <nathan@kernel.org>
next reply other threads:[~2025-10-18 17:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-18 17:52 Nathan Chancellor [this message]
2025-10-21 8:18 ` [PATCH] powerpc/vmlinux.lds: Drop .interp description Vishal Chourasia
2025-10-27 7:46 ` Vishal Chourasia
2025-10-28 8:58 ` Madhavan Srinivasan
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=20251018-ppc-fix-lld-interp-v1-1-a083de6dccc9@kernel.org \
--to=nathan@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=maddy@linux.ibm.com \
--cc=morbo@google.com \
--cc=mpe@ellerman.id.au \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=npiggin@gmail.com \
--cc=vishalc@linux.ibm.com \
/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;
as well as URLs for NNTP newsgroup(s).