All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Michal Marek <mmarek@suse.cz>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: LTO build errors (Re: linux-next: clean up the kbuild tree?)
Date: Tue, 24 Nov 2015 20:33:44 -0800	[thread overview]
Message-ID: <20151125043344.GG8438@tassilo.jf.intel.com> (raw)
In-Reply-To: <s5hy4dnicgv.wl-tiwai@suse.de>


Hi Takashi,

On Tue, Nov 24, 2015 at 05:33:36PM +0100, Takashi Iwai wrote:
>   LD      vmlinux
> arch/x86/kernel/cpu/perf_event_intel_rapl.c:66:20: error: rapl_domain_names causes a section type conflict with __setup_str_set_reset_devices
>  static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
>                     ^
> init/main.c:159:19: note: ‘__setup_str_set_reset_devices’ was declared here
>  __setup("reset_devices", set_reset_devices);
> 
> Hmm...  I see no direct relation, but OK, let's try to get rid of
> __initconst.  Now it hits lots of other errors like:

I hit the same issue, will send a patch. The other symbol is typically some
random correct symbol because gcc detects the conflict on a pair of symbols.

The problem is that placing const correctly is too difficult, the correct line
would be 

static const char *const rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {

> 
> `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin)
> `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin)
> `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin)
> `__sw_hweight32' referenced in section `.text' of /tmp/ccUCMU7n.ltrans13.ltrans.o: defined in discarded section `.text' of lib/built-in.o (symbol from plugin)

This needs

https://git.kernel.org/cgit/linux/kernel/git/ak/linux-misc.git/commit/?h=lto-4.0&id=d826425f7a9d935d521989bd0a871b76fb4c59e2


> /tmp/ccUCMU7n.ltrans21.ltrans.o: In function `do_exit':
> <artificial>:(.text+0xfc0): undefined reference to `sys_futex'
> /tmp/ccUCMU7n.ltrans22.ltrans.o: In function `_do_fork':
> <artificial>:(.text+0x39f7): undefined reference to `ret_from_fork'
> <artificial>:(.text+0x4428): undefined reference to `ret_from_kernel_thread'


That's new, but can be fixed by adding __visible or asmlinkage to these symbols
I guess it's from the recent entry* restructuring.

I'll do an updated tree later.

Everything that's called from assembler in C needs to be marked like this. It's
fairly mechanic.

-andi

  reply	other threads:[~2015-11-25  4:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-15  0:27 linux-next: clean up the kbuild tree? Stephen Rothwell
2015-11-15 17:58 ` Andi Kleen
2015-11-16 13:01   ` Michal Marek
2015-11-21  1:00     ` Andi Kleen
2015-11-21 10:55       ` Takashi Iwai
2015-11-24  2:12         ` Andi Kleen
2015-11-24 16:33           ` LTO build errors (Re: linux-next: clean up the kbuild tree?) Takashi Iwai
2015-11-25  4:33             ` Andi Kleen [this message]
2015-11-25  6:58               ` Takashi Iwai
2015-11-30 17:46                 ` Andi Kleen

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=20151125043344.GG8438@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=sfr@canb.auug.org.au \
    --cc=tiwai@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.