Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fix: mm/slab: fix section mismatch warning mm: fix section mismatch warnings init/main: use __init_refok to fix section mismatch kbuild: introduce __init_refok/__initdata_refok to supress section mismatch warnings all-archs: consolidate .data section definition in asm-generic all-archs: consolidate .text section definition in asm-generic kbuild: add "Section mismatch" warning whitelist for powerpc kbuild: make better section mismatch reports on i386, arm and mips kbuild: make modpost section warnings clearer kconfig: search harder for curses library in check-lxdialog.sh kbuild: include limits.h in sumversion.c for PATH_MAX powerpc: Fix the MODALIAS generation in modpost for of devices
This commit is contained in:
@@ -45,6 +45,19 @@
|
||||
#define __exitdata __attribute__ ((__section__(".exit.data")))
|
||||
#define __exit_call __attribute_used__ __attribute__ ((__section__ (".exitcall.exit")))
|
||||
|
||||
/* modpost check for section mismatches during the kernel build.
|
||||
* A section mismatch happens when there are references from a
|
||||
* code or data section to an init section (both code or data).
|
||||
* The init sections are (for most archs) discarded by the kernel
|
||||
* when early init has completed so all such references are potential bugs.
|
||||
* For exit sections the same issue exists.
|
||||
* The following markers are used for the cases where the reference to
|
||||
* the init/exit section (code or data) is valid and will teach modpost
|
||||
* not to issue a warning.
|
||||
* The markers follow same syntax rules as __init / __initdata. */
|
||||
#define __init_refok noinline __attribute__ ((__section__ (".text.init.refok")))
|
||||
#define __initdata_refok __attribute__ ((__section__ (".data.init.refok")))
|
||||
|
||||
#ifdef MODULE
|
||||
#define __exit __attribute__ ((__section__(".exit.text")))
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user