kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings
authorSam Ravnborg <sam@ravnborg.org>
Thu, 17 May 2007 18:14:48 +0000 (20:14 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Sat, 19 May 2007 07:11:58 +0000 (09:11 +0200)
commit0e0d314e6a01bb14d303e35e6f7ba24b17020044
tree596929a373bbbba7c2d7af4ae6e485a4c584b76f
parentca967258b69eb65dcb07bbab90fdf964c6d2ec45
kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings

Throughout the kernel there are a few legitimite references
to init or exit sections. Most of these are covered by the
patterns included in modpost but a few nees special attention.
To avoid hardcoding a lot of function names in modpost introduce
a marker so relevant function/data can be marked.
When modpost see a reference to a init/exit function from
a function/data marked no warning will be issued.

Idea from: Andrew Morton <akpm@linux-foundation.org>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
include/asm-generic/vmlinux.lds.h
include/linux/init.h
scripts/mod/modpost.c