Re: [PATCH v3 01/64] s390/vmlinux.lds.S: Prevent thunk functions from getting placed with normal text

From: Heiko Carstens
Date: Fri Jun 27 2025 - 05:35:25 EST


On Thu, Jun 26, 2025 at 04:54:48PM -0700, Josh Poimboeuf wrote:
> The s390 indirect thunks are placed in the .text.__s390_indirect_jump_*
> sections.
>
> Certain config options which enable -ffunction-sections have a custom
> version of the TEXT_TEXT macro:
>
> .text.[0-9a-zA-Z_]*
>
> That unintentionally matches the thunk sections, causing them to get
> grouped with normal text rather than being handled by their intended
> rule later in the script:
>
> *(.text.*_indirect_*)
>
> Fix that by adding another period to the thunk section names, following
> the kernel's general convention for distinguishing code-generated text
> sections from compiler-generated ones.
>
> Cc: Heiko Carstens <hca@xxxxxxxxxxxxx>
> Cc: Vasily Gorbik <gor@xxxxxxxxxxxxx>
> Cc: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
> Signed-off-by: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
> ---
> arch/s390/include/asm/nospec-insn.h | 2 +-
> arch/s390/kernel/vmlinux.lds.S | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Heiko Carstens <hca@xxxxxxxxxxxxx>