Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277058
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: LTO build errors (Re: linux-next: clean up the kbuild tree?) |
| Date | 2015-11-25 08:00 +0100 |
| Message-ID | <qyCdA-2Ax-5@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qx4QF-6Ei-3@gated-at.bofh.it> <qxe3E-49I-3@gated-at.bofh.it> <qybn5-1PG-13@gated-at.bofh.it> <qyoNj-29z-3@gated-at.bofh.it> <qyA26-1a1-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 25 Nov 2015 05:33:44 +0100,
Andi Kleen wrote:
>
>
> 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 = {
Ah, so I should have ignored the relation with __setup_* but
concentrate on the line. LTO goes much deeper than a human being can
look through :)
Yes, such an error is often overseen. A quick grep shows the
following:
arch/arc/plat-axs10x/axs10x.c:463:static const char *axs101_compat[] __initconst = {
arch/arc/plat-axs10x/axs10x.c:477:static const char *axs103_compat[] __initconst = {
arch/arc/plat-sim/platform.c:22:static const char *simulation_compat[] __initconst = {
arch/arm/mach-imx/mach-imx6ul.c:87:static const char *imx6ul_dt_compat[] __initconst = {
arch/arm/mach-shmobile/setup-r8a7793.c:22:static const char *r8a7793_boards_compat_dt[] __initconst = {
arch/x86/kernel/cpu/perf_event_intel_rapl.c:66:static const char *rapl_domain_names[NR_RAPL_DOMAINS] __initconst = {
drivers/clk/pistachio/clk.h:40:#define PNAME(x) static const char *x[] __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
OK, noted.
> > /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.
OK, thanks for the information!
Takashi
--
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/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: linux-next: clean up the kbuild tree? Michal Marek <mmarek@suse.cz> - 2015-11-16 14:10 +0100
Re: linux-next: clean up the kbuild tree? Andi Kleen <ak@linux.intel.com> - 2015-11-21 02:10 +0100
Re: linux-next: clean up the kbuild tree? Takashi Iwai <tiwai@suse.de> - 2015-11-21 12:00 +0100
Re: linux-next: clean up the kbuild tree? Andi Kleen <ak@linux.intel.com> - 2015-11-24 03:20 +0100
LTO build errors (Re: linux-next: clean up the kbuild tree?) Takashi Iwai <tiwai@suse.de> - 2015-11-24 17:40 +0100
Re: LTO build errors (Re: linux-next: clean up the kbuild tree?) Andi Kleen <ak@linux.intel.com> - 2015-11-25 05:40 +0100
Re: LTO build errors (Re: linux-next: clean up the kbuild tree?) Takashi Iwai <tiwai@suse.de> - 2015-11-25 08:00 +0100
csiph-web