[PATCH 4/4] arm: mach-s3c2440: mini2440: fix section mismatch

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Jul 8 05:12:18 EDT 2011


On Fri, Jul 08, 2011 at 03:06:17PM +0900, Kukjin Kim wrote:
> Wolfram Sang wrote:
> > 
> > If mini2440_init() is in __init, mini2440_parse_features() should also
> > be in __init. Fixes:
> > 
> > (.text+0x9adc): Section mismatch in reference from the function
> > mini2440_parse_features.clone.0() to the (unknown reference)
> .init.data:(unknown)
> > The function mini2440_parse_features.clone.0() references the (unknown
> reference)
> > __initdata (unknown).
> 
> But I couldn't find above "Section mismatch" in my building with
> CONFIG_DEBUG_SECTION_MISMATCH=y.

Your compiler may have inlined the function, so defeating the check.

static struct s3c2410fb_display mini2440_lcd_cfg[] __initdata = {

and mini2440_parse_features() references this variable.  Therefore
either mini2440_parse_features() needs to be marked __init (it's
only caller is from __init, so that seems sensible) or the
__initdata markers on the referenced data need to be removed.

Adding __init looks like the right thing.



More information about the linux-arm-kernel mailing list