Re: [PATCH] gendwarfksyms: define __GENKSYMS__ when processing asm-protoypes.h

From: Ard Biesheuvel
Date: Thu Mar 20 2025 - 10:45:59 EST


On Thu, 20 Mar 2025 at 15:40, Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> On Thu, Mar 20, 2025 at 4:08 PM Ard Biesheuvel <ardb+git@xxxxxxxxxx> wrote:
> >
> > From: Ard Biesheuvel <ardb@xxxxxxxxxx>
> >
> > Ensure that __GENKSYMS__ is #define'd when passing asm/asm-prototypes.h
> > through the compiler to capture the exported symbols. This ensures that
> > exported symbols such as __ref_stack_chk_guard on x86, which is declared
> > conditionally, is visible to the tool.
>
>
> Why don't you make it unconditional, then?
>

Because this symbol is being hidden from the compiler.

Commit 577c134d311b9b has the details.