Re: Detecting section mismatches in vmlinux
From: Atsushi Nemoto
Date: Sun Feb 25 2007 - 10:48:59 EST
On Sun, 25 Feb 2007 00:25:27 +0100, Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> Attached patch does:
> 1) Do not check vmlinux but check all .o files that is used to create vmlinux
> 2) Teach modpost to skip non-elf files (.a files and empty .o files etc)
>
> With this change we get proper check of vmlinux (or files used to create vmlinux)
Thanks! It works fine for me too.
> This gives following errors in a x86_64 defconfig build:
>
> WARNING: init/built-in.o - Section mismatch: reference to .init.text:init from .text between 'rest_init' (at offset 0xe) and 'run_init_process'
This is because rest_init() (non __init) references 'init' (__init) as
an argument of kernel_thread(). No idea how to avoid this warning...
> WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x1e6fb) and 'slab_get_obj'
> WARNING: mm/built-in.o - Section mismatch: reference to .init.data:initkmem_list3 from .text between 'set_up_list3s' (at offset 0x1e71c) and 'slab_get_obj'
This is because set_up_list3s() (non __init) references
initkmem_list3[] (__initdata). The set_up_list3s() is only used on
early stage so can be __init, but it cause an another mismatch ---
setup_cpu_cache() (non __init) calls __init function. Some trick
using a function pointer might solve this issue, but I wonder it is a
right thing to do...
Or we need another whitelist for vmlinux?
---
Atsushi Nemoto
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/