Skip to contentSkip to conversation

Linker Issues with built-in.o on my machine for x86

DISCUSSION Steven Rostedt 1 participant 1 message Jan 11, 2015 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 7 lines · On Sun, 11 Jan 2015 15:39:18 -0500 nick <[email protected]> wrote:

Greetings x86 Maintainers.
I am getting a linker error as of today on a up to date git tree of linus's on my x86 machine.
Below this message is the linker message I am getting.
WARNING: arch/x86/kernel/built-in.o(.text.unlikely+0x1204): Section mismatch in reference from the function cpumask_empty.constprop.3() to the variable .init.data:nmi_ipi_mask The function cpumask_empty.constprop.3() references
the variable __initdata nmi_ipi_mask.
This is often because cpumask_empty.constprop.3 lacks a __initdata

Hmm, I bet it had something to do with some sort of gcc optimization, and is mostly harmless.

Quoted 1 line

annotation or the annotation of nmi_ipi_mask is wrong.

What gcc are you using and can you send your .config.

remote_ipi() (which is annotated as __init), calls cpumask_empty() (a static inlined function) with to_cpumask(nmi_ipi_mask). There's nothing wrong here. I don't see anyway that cpumask_empty() could use nmi_ipi_mask after boot up.

Seeing that it's not cpumask_empty(), but cpumask_empty.constprop.3 tells me that gcc probably created some function from the static inline function of cpumask_empty() and that causes the section mismatch test to give a false error.

If anything should be fixed here, it is to find a way to fix the section mismatch test from reporting bogus errors like this.

-- Steve