From 0e0d314e6a01bb14d303e35e6f7ba24b17020044 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Thu, 17 May 2007 20:14:48 +0200 Subject: 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 Signed-off-by: Sam Ravnborg Cc: Andrew Morton --- include/asm-generic/vmlinux.lds.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/asm-generic/vmlinux.lds.h') 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 @@ /* .data section */ #define DATA_DATA \ - *(.data) + *(.data) \ + *(.data.init.refok) #define RODATA \ . = ALIGN(4096); \ @@ -147,7 +148,8 @@ * during second ld run in second ld pass when generating System.map */ #define TEXT_TEXT \ ALIGN_FUNCTION(); \ - *(.text) + *(.text) \ + *(.text.init.refok) /* sched.text is aling to function alignment to secure we have same * address even at second ld pass when generating System.map */ -- cgit v1.2.3-59-g8ed1b