linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: linux-kernel@vger.kernel.org, sam@ravnborg.org, x86@kernel.org,
	linux-kbuild@vger.kernel.org, Joe Mario <jmario@redhat.com>,
	rusty@rustcorp.com.au, Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 05/20] lto: Handle LTO common symbols in module loader
Date: Tue, 18 Feb 2014 09:53:03 -0500	[thread overview]
Message-ID: <20140218145303.GC5339@phenom.dumpdata.com> (raw)
In-Reply-To: <1392733738-8290-6-git-send-email-andi@firstfloor.org>

On Tue, Feb 18, 2014 at 03:28:43PM +0100, Andi Kleen wrote:
> From: Joe Mario <jmario@redhat.com>
> 
> Here is the workaround I made for having the kernel not reject modules
> built with -flto.  The clean solution would be to get the compiler to not
> emit the symbol.  Or if it has to emit the symbol, then emit it as
> initialized data but put it into a comdat/linkonce section.
> 
> Minor tweaks by AK over Joe's patch.

Should Joe's SOB be on this patch ?
> 
> Cc: rusty@rustcorp.com.au
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
>  kernel/module.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/kernel/module.c b/kernel/module.c
> index d24fcf2..b99e801 100644
> --- a/kernel/module.c
> +++ b/kernel/module.c
> @@ -1948,6 +1948,10 @@ static int simplify_symbols(struct module *mod, const struct load_info *info)
>  
>  		switch (sym[i].st_shndx) {
>  		case SHN_COMMON:
> +			/* Ignore common symbols */
> +			if (!strncmp(name, "__gnu_lto", 9))
> +				break;
> +
>  			/* We compiled with -fno-common.  These are not
>  			   supposed to happen.  */
>  			pr_debug("Common symbol: %s\n", name);
> -- 
> 1.8.5.2
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

  reply	other threads:[~2014-02-18 14:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 14:28 Link Time Optimization patchkit v3 Andi Kleen
2014-02-18 14:28 ` [PATCH 01/20] x86, lto: Disable LTO for the x86 VDSO Andi Kleen
2014-02-18 14:28 ` [PATCH 02/20] lto: Disable LTO for hweight functions Andi Kleen
2014-02-18 14:28 ` [PATCH 03/20] lto: Make asmlinkage __visible Andi Kleen
2014-02-18 14:28 ` [PATCH 04/20] lto, workaround: Add workaround for initcall reordering Andi Kleen
2014-02-18 14:28 ` [PATCH 05/20] lto: Handle LTO common symbols in module loader Andi Kleen
2014-02-18 14:53   ` Konrad Rzeszutek Wilk [this message]
2014-02-18 14:28 ` [PATCH 06/20] lto: Disable LTO for sys_ni Andi Kleen
2014-02-18 14:28 ` [PATCH 07/20] lto: Don't let LATENCYTOP and LOCKDEP select KALLSYMS_ALL Andi Kleen
2014-02-18 14:28 ` [PATCH 08/20] Kbuild, lto, workaround: Don't warn for initcall_reference in modpost Andi Kleen
2014-02-18 14:28 ` [PATCH 09/20] Kbuild, lto: Drop .number postfixes " Andi Kleen
2014-02-18 14:28 ` [PATCH 10/20] Kbuild, lto: add ld-version and ld-ifversion macros Andi Kleen
2014-02-18 14:28 ` [PATCH 11/20] Kbuild, lto: Add a gcc-ld script to let run gcc as ld Andi Kleen
2014-02-18 14:28 ` [PATCH 12/20] Kbuild, lto: Disable LTO for asm-offsets.c Andi Kleen
2014-02-18 14:28 ` [PATCH 13/20] Kbuild, lto: Set TMPDIR for LTO v2 Andi Kleen
2014-02-18 14:35   ` H. Peter Anvin
2014-02-18 14:28 ` [PATCH 14/20] Kbuild, lto: Handle basic LTO in modpost Andi Kleen
2014-02-18 14:28 ` [PATCH 15/20] Kbuild, lto: Fix single pass kallsyms for LTO Andi Kleen
2014-02-18 14:28 ` [PATCH 16/20] Kbuild, lto: Add Link Time Optimization support v2 Andi Kleen
2014-02-18 14:28 ` [PATCH 17/20] Kbuild, bloat-o-meter: Ignore .lto_priv postfix Andi Kleen
2014-02-18 14:51   ` Konrad Rzeszutek Wilk
2014-02-18 14:28 ` [PATCH 18/20] lto: Mark spinlocks noinline when inline spinlocks are disabled Andi Kleen
2014-02-18 14:28 ` [PATCH 19/20] lto, module: Warn about modules that are not fully LTOed Andi Kleen
2014-02-18 14:50   ` Konrad Rzeszutek Wilk
2014-02-18 18:52     ` Andi Kleen
2014-02-18 14:28 ` [PATCH 20/20] lto: Don't inline __const_udelay Andi Kleen
2014-02-18 14:34 ` Link Time Optimization patchkit v3 H. Peter Anvin

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=20140218145303.GC5339@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jmario@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.org \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).