Re: [PATCH v7 03/11] kbuild: generate KSYMTAB entries by modpost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 8, 2023 at 11:24 PM Masahiro Yamada <masahiroy@xxxxxxxxxx> 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




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux