aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic/vmlinux.lds.h
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2007-05-17 14:14:48 -0400
committerSam Ravnborg <sam@ravnborg.org>2007-05-19 03:11:58 -0400
commit0e0d314e6a01bb14d303e35e6f7ba24b17020044 (patch)
tree596929a373bbbba7c2d7af4ae6e485a4c584b76f /include/asm-generic/vmlinux.lds.h
parentca967258b69eb65dcb07bbab90fdf964c6d2ec45 (diff)
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>
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 52e2d69ee535..8307b1bb337a 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -11,7 +11,8 @@
11 11
12/* .data section */ 12/* .data section */
13#define DATA_DATA \ 13#define DATA_DATA \
14 *(.data) 14 *(.data) \
15 *(.data.init.refok)
15 16
16#define RODATA \ 17#define RODATA \
17 . = ALIGN(4096); \ 18 . = ALIGN(4096); \
@@ -147,7 +148,8 @@
147 * during second ld run in second ld pass when generating System.map */ 148 * during second ld run in second ld pass when generating System.map */
148#define TEXT_TEXT \ 149#define TEXT_TEXT \
149 ALIGN_FUNCTION(); \ 150 ALIGN_FUNCTION(); \
150 *(.text) 151 *(.text) \
152 *(.text.init.refok)
151 153
152/* sched.text is aling to function alignment to secure we have same 154/* sched.text is aling to function alignment to secure we have same
153 * address even at second ld pass when generating System.map */ 155 * address even at second ld pass when generating System.map */