Messages in this thread | | | From | Masahiro Yamada <> | Date | Sat, 10 Jun 2023 17:56:22 +0900 | Subject | Re: [PATCH v7 03/11] kbuild: generate KSYMTAB entries by modpost |
| |
On Thu, Jun 8, 2023 at 11:24 PM Masahiro Yamada <masahiroy@kernel.org> wrote: > > Commit 7b4537199a4a ("kbuild: link symbol CRCs at final link, removing > CONFIG_MODULE_REL_CRCS") made modpost output CRCs in the same way > whether the EXPORT_SYMBOL() is placed in *.c or *.S. > > For further cleanups, this commit applies a similar approach to the > entire data structure of EXPORT_SYMBOL(). > > The EXPORT_SYMBOL() compilation is split into two stages. > > When a source file is compiled, EXPORT_SYMBOL() is converted into a > dummy symbol in the .export_symbol section. > > For example, > > EXPORT_SYMBOL(foo); > EXPORT_SYMBOL_NS_GPL(bar, BAR_NAMESPACE); > > will be encoded into the following assembly code: > > .section ".export_symbol","a" > __export_symbol__foo: > .asciz "" > .balign 4 > .long foo - .
I hope this will work for all arches, but unfortunately, the 0day bot reported breakages on xtensa.
I will restore the code in v6.
-- Best Regards Masahiro Yamada
| |