From: Rusty Russell <rusty@rustcorp.com.au>
To: Andi Kleen <andi@firstfloor.org>, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible
Date: Wed, 23 Oct 2013 11:39:09 +1030 [thread overview]
Message-ID: <87mwm0iyiy.fsf@rustcorp.com.au> (raw)
In-Reply-To: <1382458346-24811-8-git-send-email-andi@firstfloor.org>
Andi Kleen <andi@firstfloor.org> writes:
> From: Andi Kleen <ak@linux.intel.com>
>
> Make the ksymtab symbols for EXPORT_SYMBOL visible.
> This prevents the LTO compiler from adding a .NUMBER prefix,
> which avoids various problems in later export processing.
Applied, thanks.
Cheers,
Rusty.
> Cc: rusty@rustcorp.com.au
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> include/linux/export.h | 4 ++--
> scripts/mod/modpost.c | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/export.h b/include/linux/export.h
> index 412cd50..3f2793d 100644
> --- a/include/linux/export.h
> +++ b/include/linux/export.h
> @@ -43,7 +43,7 @@ extern struct module __this_module;
> /* Mark the CRC weak since genksyms apparently decides not to
> * generate a checksums for some symbols */
> #define __CRC_SYMBOL(sym, sec) \
> - extern void *__crc_##sym __attribute__((weak)); \
> + extern __visible void *__crc_##sym __attribute__((weak)); \
> static const unsigned long __kcrctab_##sym \
> __used \
> __attribute__((section("___kcrctab" sec "+" #sym), unused)) \
> @@ -59,7 +59,7 @@ extern struct module __this_module;
> static const char __kstrtab_##sym[] \
> __attribute__((section("__ksymtab_strings"), aligned(1))) \
> = VMLINUX_SYMBOL_STR(sym); \
> - static const struct kernel_symbol __ksymtab_##sym \
> + __visible const struct kernel_symbol __ksymtab_##sym \
> __used \
> __attribute__((section("___ksymtab" sec "+" #sym), unused)) \
> = { (unsigned long)&sym, __kstrtab_##sym }
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 8247979..0971bac 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1853,7 +1853,7 @@ static void add_header(struct buffer *b, struct module *mod)
> buf_printf(b, "\n");
> buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
> buf_printf(b, "\n");
> - buf_printf(b, "struct module __this_module\n");
> + buf_printf(b, "__visible struct module __this_module\n");
> buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
> buf_printf(b, "\t.name = KBUILD_MODNAME,\n");
> if (mod->has_init)
> --
> 1.8.3.1
next prev parent reply other threads:[~2013-10-23 1:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-22 16:12 Various asmlinkage fixes for LTO Andi Kleen
2013-10-22 16:12 ` [PATCH 01/11] asmlinkage, kvm: Make kvm_rebooting visible Andi Kleen
2013-10-30 9:27 ` Gleb Natapov
2013-10-22 16:12 ` [PATCH 02/11] asmlinkage: Make __iowrite32_copy visible Andi Kleen
2013-10-26 10:02 ` Ingo Molnar
2013-10-22 16:12 ` [PATCH 03/11] asmlinkage: Make jiffies visible Andi Kleen
2013-10-22 16:12 ` [PATCH 04/11] asmlinkage, pnp: Make variables used from assembler code visible Andi Kleen
2013-10-22 16:12 ` [PATCH 05/11] asmlinkage: Make lockdep_sys_exit asmlinkage Andi Kleen
2013-10-22 16:12 ` [PATCH 06/11] asmlinkage: Make trace_hardirq visible Andi Kleen
2013-10-22 20:18 ` Peter Zijlstra
2013-10-23 2:15 ` Andi Kleen
2013-10-22 16:12 ` [PATCH 07/11] asmlinkage, module: Make ksymtab and kcrctab symbols and __this_module __visible Andi Kleen
2013-10-23 1:09 ` Rusty Russell [this message]
2013-10-22 16:12 ` [PATCH 08/11] asmlinkage, mutex: Mark __visible Andi Kleen
2013-10-22 16:12 ` [PATCH 09/11] asmlinkage: Make main_extable_sort_needed visible Andi Kleen
2013-10-22 16:12 ` [PATCH 10/11] asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage Andi Kleen
2013-10-22 16:12 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
2013-10-22 17:59 ` David Miller
2013-10-22 18:36 ` [PATCH] net: wan: sbni: remove assembly crc32 code Sebastian Andrzej Siewior
2013-10-22 18:38 ` David Miller
2013-10-23 2:11 ` Andi Kleen
2013-10-25 23:27 ` David Miller
2013-10-23 2:09 ` [PATCH 11/11] asmlinkage, wan/sbni: Make inline assembler symbols visible and assembler global Andi Kleen
2013-10-23 2:15 ` Florian Fainelli
2013-10-23 2:22 ` Andi Kleen
2013-10-23 6:28 ` Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwm0iyiy.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome