AnsweredAssumed Answered

KERNEL: Section Mismatch in Kernel

Question asked by James.Kosin on Jul 16, 2012
Latest reply on Jul 23, 2012 by James.Kosin

I'm using the latest trunk version of the kernel, and I'm trying to trouble-shoot a strange warning I can't find the problem in the code.

With

make CONFIG_DEBUG_SECTION_MISMATCH=y

The warning is:

WARNING: vmlinux.o(.data+0xf954): Section mismatch in reference from the variable ___param_ops_mtd to the function .init.text:_ubi_mtd_param_parse()

The variable ___param_ops_mtd references

the function __init _ubi_mtd_param_parse()

If the reference is valid then annotate the

variable with __init* or __refdata (see linux/init.h) or name the variable:

*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

 

 

But, I can't find a variable with that name anywhere in the code.  GREP reports the variable in binary, linker files and the like but no C, ASM or other source files.

 

I've found the function ubi_mtd_param_parse() in the drivers/mtd/ubi/build.c file; but, can't find anything wrong with the file or references to the fore-mentioned variable.

 

I'm guessing by the warning the variable should really be named __param_mtd_ops instead of the current __param_ops_mtd ... but, don't see anywhere where this is the case.

 

Any ideas.

Outcomes