2019-10-18 22:28:16

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols

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 <[email protected]>
---

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


2019-11-06 15:45:32

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH 1/2] asm-generic/export.h: make __ksymtab_* local symbols

On Fri, Oct 18, 2019 at 2:03 PM Masahiro Yamada
<[email protected]> 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 <[email protected]>
> ---

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