lkml.org 
[lkml]   [2023]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2023-06-10 10:57    [W:0.194 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site