Bogus section mismatch errors?
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?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 7 lines · Russell King
WARNING:
arch/arm/mach-realview/built-in.o- Section mismatch:
reference to .init.text: from .data between 'realview_timer' (at offset0x54) and 'clcd_plat_data'Weird, these two data structures don't interact with each other. Probably bogus.
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 that is marked __init.
Quoted 4 lines
WARNING:
init/built-in.o- Section mismatch:
reference to .init.text: from .text between 'rest_init' (at offset0x2c) and 'run_init_process'
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, then modpost will recognize the symbol and see this is OK.
Quoted 6 lines
WARNING:
mm/built-in.o- Section mismatch:
reference to .init.text: from .text between 'kmem_cache_create' (at offset0x1bd94) and 'cache_reap'
WARNING:mm/built-in.o- Section mismatch:
reference to .init.text: from .text between 'kmem_cache_create' (at offset0x1bdcc) and 'cache_reap'
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: Sam Ravnborg <[email protected]>
Date: Tue, 8 May 2007 13:52:20 +0200
Quoted 7 lines
There are in slab a function that is not marked
__initthat 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:__nowarnand__nowarndata
Quoted 5 lines
I am planning to implement something so we can mark functions/data with:
__init_ref_okand_init_data_ref_ok
Which is indeed more ugly but expalins what is actually OK.I hope to take a look during the weekend.
Thanks for working on this, it's the only mismatch I still see on sparc64 in current GIT :-)
Quoted 7 lines · Sam Ravnborg
Quoted 6 lines · Russell King
WARNING:
mm/built-in.o- Section mismatch:
reference to .init.text: from .text between 'kmem_cache_create' (at offset0x1bd94) and 'cache_reap'
WARNING:mm/built-in.o- Section mismatch:
reference to .init.text: from .text between 'kmem_cache_create' (at offset0x1bdcc) and 'cache_reap'
Quoted 7 lines
There are in slab a function that is not marked
__initthat 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:__nowarnand__nowarndata
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?