* [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols
@ 2019-10-18 4:31 Masahiro Yamada
2019-10-18 4:31 ` [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols Masahiro Yamada
2019-11-06 15:41 ` [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-10-18 4:31 UTC (permalink / raw)
To: linux-kernel, Jessica Yu
Cc: Nicholas Piggin, Al Viro, Masahiro Yamada, Arnd Bergmann, linux-arch
For EXPORT_SYMBOL from C files, <linux/export.h> defines __ksymtab_*
as local symbols.
For EXPORT_SYMBOL from assembly, in contrast, <asm-generic/export.h>
produces globally-visible __ksymtab_* symbols due to this .globl
directive.
I do not understand why this must be global. It still works without
this .globl directive.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
include/asm-generic/export.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
index fa577978fbbd..80ef2dc0c8be 100644
--- a/include/asm-generic/export.h
+++ b/include/asm-generic/export.h
@@ -31,7 +31,6 @@
*/
.macro ___EXPORT_SYMBOL name,val,sec
#ifdef CONFIG_MODULES
- .globl __ksymtab_\name
.section ___ksymtab\sec+\name,"a"
.balign KSYM_ALIGN
__ksymtab_\name:
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols
2019-10-18 4:31 [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
@ 2019-10-18 4:31 ` Masahiro Yamada
2019-11-06 15:41 ` Masahiro Yamada
2019-11-06 15:41 ` [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
1 sibling, 1 reply; 4+ messages in thread
From: Masahiro Yamada @ 2019-10-18 4:31 UTC (permalink / raw)
To: linux-kernel, Jessica Yu
Cc: Nicholas Piggin, Al Viro, Masahiro Yamada, Arnd Bergmann, linux-arch
EXPORT_SYMBOL from assembly code produces an unused symbol __kcrctab_*.
kcrctab is used as a section name (prefixed with three underscores),
but never used as a symbol.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
include/asm-generic/export.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
index 80ef2dc0c8be..a3983e2ce0fd 100644
--- a/include/asm-generic/export.h
+++ b/include/asm-generic/export.h
@@ -43,7 +43,6 @@ __kstrtab_\name:
#ifdef CONFIG_MODVERSIONS
.section ___kcrctab\sec+\name,"a"
.balign KCRC_ALIGN
-__kcrctab_\name:
#if defined(CONFIG_MODULE_REL_CRCS)
.long __crc_\name - .
#else
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols
2019-10-18 4:31 [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
2019-10-18 4:31 ` [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols Masahiro Yamada
@ 2019-11-06 15:41 ` Masahiro Yamada
1 sibling, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-11-06 15:41 UTC (permalink / raw)
To: Linux Kernel Mailing List, Jessica Yu
Cc: Nicholas Piggin, Al Viro, Arnd Bergmann, linux-arch
On Fri, Oct 18, 2019 at 2:03 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> For EXPORT_SYMBOL from C files, <linux/export.h> defines __ksymtab_*
> as local symbols.
>
> For EXPORT_SYMBOL from assembly, in contrast, <asm-generic/export.h>
> produces globally-visible __ksymtab_* symbols due to this .globl
> directive.
>
> I do not understand why this must be global. It still works without
> this .globl directive.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
I did not get objection, at least.
Applied to linux-kbuild.
>
> include/asm-generic/export.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
> index fa577978fbbd..80ef2dc0c8be 100644
> --- a/include/asm-generic/export.h
> +++ b/include/asm-generic/export.h
> @@ -31,7 +31,6 @@
> */
> .macro ___EXPORT_SYMBOL name,val,sec
> #ifdef CONFIG_MODULES
> - .globl __ksymtab_\name
> .section ___ksymtab\sec+\name,"a"
> .balign KSYM_ALIGN
> __ksymtab_\name:
> --
> 2.17.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols
2019-10-18 4:31 ` [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols Masahiro Yamada
@ 2019-11-06 15:41 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-11-06 15:41 UTC (permalink / raw)
To: Linux Kernel Mailing List, Jessica Yu
Cc: Nicholas Piggin, Al Viro, Arnd Bergmann, linux-arch
On Fri, Oct 18, 2019 at 1:56 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> EXPORT_SYMBOL from assembly code produces an unused symbol __kcrctab_*.
>
> kcrctab is used as a section name (prefixed with three underscores),
> but never used as a symbol.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Applied to linux-kbuild.
>
> include/asm-generic/export.h | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h
> index 80ef2dc0c8be..a3983e2ce0fd 100644
> --- a/include/asm-generic/export.h
> +++ b/include/asm-generic/export.h
> @@ -43,7 +43,6 @@ __kstrtab_\name:
> #ifdef CONFIG_MODVERSIONS
> .section ___kcrctab\sec+\name,"a"
> .balign KCRC_ALIGN
> -__kcrctab_\name:
> #if defined(CONFIG_MODULE_REL_CRCS)
> .long __crc_\name - .
> #else
> --
> 2.17.1
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-06 15:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18 4:31 [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
2019-10-18 4:31 ` [PATCH 2/2] asm-generic/export.h: remove unneeded __kcrctab_* symbols Masahiro Yamada
2019-11-06 15:41 ` Masahiro Yamada
2019-11-06 15:41 ` [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).