Re: Bogus section mismatch errors?

Previous thread: [PATCH] change zonelist order v5 [0/3] by KAMEZAWA Hiroyuki on Tuesday, May 8, 2007 - 4:14 am. (22 messages)

Next thread: Re: + git-battery-fix.patch added to -mm tree by Anton Vorontsov on Tuesday, May 8, 2007 - 4:19 am. (4 messages)
From: Russell King
Date: Tuesday, May 8, 2007 - 4:17 am

WARNING: arch/arm/mach-realview/built-in.o - Section mismatch:
 reference to .init.text: from .data between 'realview_timer' (at offset 0x54)
 and 'clcd_plat_data'

Weird, these two data structures don't interact with each other.  Probably
bogus.

WARNING: init/built-in.o - Section mismatch:
 reference to .init.text: from .text between 'rest_init' (at offset 0x2c)
 and 'run_init_process'
WARNING: mm/built-in.o - Section mismatch:
 reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x1bd94)
 and 'cache_reap'
WARNING: mm/built-in.o - Section mismatch:
 reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x1bdcc)
 and 'cache_reap'

Are these more bogus?

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:
-

From: Sam Ravnborg
Date: Tuesday, May 8, 2007 - 4:52 am

modpsot does it best to guess what symbol are represented by an address.
In this case I would assume that realview_timer has a function pointer to a function
This is due to the reference to kernel_init - but binutils hardcode the offset
so modpost does not recognize the symbol.
A workaround (that I do not like) it to remove static declaration of kernel_init,
There are in slab a function that is not marked __init that refer to a function marked
__init. But the logic surrounding makes it OK.

I have no fix/workaround for this.
Andres has suggested that we should mark functions/data that may refer to __init{data}
with something like: __nowarn and __nowarndata

I am planning to implement something so we can mark functions/data with:
__init_ref_ok and _init_data_ref_ok
Which is indeed more ugly but expalins what is actually OK.

I hope to take a look during the weekend.

	Sam
-

From: David Miller
Date: Tuesday, May 8, 2007 - 1:41 pm

From: Sam Ravnborg <sam@ravnborg.org>

Thanks for working on this, it's the only mismatch I still see
on sparc64 in current GIT :-)
-

From: Paul Mundt
Date: Wednesday, May 9, 2007 - 2:59 am

Here's one I've started getting with the quicklist changes:

WARNING: mm/built-in.o - Section mismatch: reference to .init.text: from .text between 'kmem_cache_create' (at offset 0x1ba5c) and 'quicklist_total_size'

quicklist_total_size() is not marked __init, nor is show_mem() in
arch/sh/mm/init.c, where I've added the reference. Ideas?
-

Previous thread: [PATCH] change zonelist order v5 [0/3] by KAMEZAWA Hiroyuki on Tuesday, May 8, 2007 - 4:14 am. (22 messages)

Next thread: Re: + git-battery-fix.patch added to -mm tree by Anton Vorontsov on Tuesday, May 8, 2007 - 4:19 am. (4 messages)