Re: [PATCH] x86/boot: Discard .interp sections

From: Borislav Petkov

Date: Wed Apr 08 2026 - 08:53:48 EST


On Wed, Apr 08, 2026 at 01:01:24PM +0100, Nam Le wrote:

> Link: https://github.com/llvm/llvm-project/issues/78873#issuecomment-1902794108

>From that page:

"I guess the only choice is patching the kernel then."

People better delete this thinking from their heads! The kernel doesn't mop up
for everyone else's silliness.

> Normally I would never add this flag, but some package manager (specifically
> Nix) adds --dynamic-linker as a default when building any applications.
> Ideally this should be a fix on LLVM's side of things since its a pretty
> significant difference in behavior between ld.lld and ld.bfd, but for the
> meantime I believe this is a minimal enough change to fix the issue.

I'd like for your commit message to explain why *exactly* your patch exists.
I.e., the Nix use case.

> Thank you for the advice! Should I add a comment and submit a v2 patch for
> the change?

Michael's suggestion of using --no-dynamic-linker makes more sense to me. We
usually protect ourselves this way from the toolchain - by turning off flags
explicitly.

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette