Re: [PATCH v5 18/19] kbuild: Add gendwarfksyms as an alternative to genksyms
From: Sami Tolvanen
Date: Wed Nov 13 2024 - 12:49:12 EST
Hi Masahiro,
On Mon, Nov 11, 2024 at 8:09 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> wrote:
>
> On Thu, Oct 31, 2024 at 2:01 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
> >
> > # These mirror gensymtypes_c and co above, keep them in synch.
> > -cmd_gensymtypes_S = \
> > - { echo "\#include <linux/kernel.h>" ; \
> > - echo "\#include <asm/asm-prototypes.h>" ; \
> > - $(NM) $@ | sed -n 's/.* __export_symbol_\(.*\)/EXPORT_SYMBOL(\1);/p' ; } | \
> > - $(CPP) -D__GENKSYMS__ $(c_flags) -xc - | $(genksyms)
> > +getasmexports = \
> > + { echo "\#include <linux/kernel.h>" ; \
> > + echo "\#include <linux/string.h>" ; \
> > + echo "\#include <asm/asm-prototypes.h>" ; \
> > + $(call getexportsymbols,$(2:.symtypes=.o),EXPORT_SYMBOL(\1);) ; }
> > +
> > +ifdef CONFIG_GENDWARFKSYMS
> > +cmd_gensymtypes_S = \
> > + $(getasmexports) | \
> > + $(CC) $(c_flags) -c -o $(2:.symtypes=.gendwarfksyms.o) -xc -; \
> > + $(call getexportsymbols,$(2:.symtypes=.o),\1) | \
> > + $(gendwarfksyms) $(2:.symtypes=.gendwarfksyms.o)
>
>
> I do not want to see crazy suffix replacements like this.
Yeah, I agree. It does get a bit ugly.
> I decided to delete this.
> https://lore.kernel.org/linux-kbuild/20241111171753.2917697-2-masahiroy@xxxxxxxxxx/T/#u
Cool, thanks! I'll rebase v6 on top of your patch.
Sami