Re: [RFC/RFT PATCH 08/19] x86: Use PIE codegen for the relocatable 64-bit kernel

Jan Engelhardt
2026-01-09T21:34:53Z

On Thursday 2026-01-08 10:25, Ard Biesheuvel wrote:
>
>As an intermediate step towards enabling PIE linking for the x86_64
>KASLR kernel, enable PIE codegen for all C and Rust objects that are
>linked into the kernel proper. Add a Kconfig option RELOCATABLE_PIE for
>this, depending on RELR support in the linker, as the relocation tables
>will blow up the kernel image otherwise.

> KBUILD_CFLAGS += $(call cc-option,-fcf-protection=branch -fno-jump-tables)
>...
>+
>+ pie-ccflags-$(CONFIG_CC_IS_GCC) += $(call cc-option.-mdirect-extern-access)

I think that dot there next to -mdirect-extern-accesss should have been
a comma.