Enable full Section mismatch analysis
configname: CONFIG_DEBUG_SECTION_MISMATCH
Linux Kernel Configuration
└─>Kernel hacking
└─>Compile-time checks and compiler options
└─>Enable full Section mismatch analysis
In linux kernel since version 2.6.25 (release Date: 2008-04-16)
The section mismatch analysis checks if there are illegal references
from one section to another. During linktime or runtime, some
sections are dropped; any use of code/data previously in these
sections would most likely result in an oops.
In the code, functions and variables are annotated with __init,
__initdata, and so on (see the full list in include/linux/init.h).
This directs the toolchain to place code/data in specific sections.
The section mismatch analysis is always performed after a full
kernel build, and enabling this option causes the option
-fno-inline-functions-called-once to be added to gcc commands.
However, when inlining a function annotated with __init in
a non-init function, we would lose the section information and thus
the analysis would not catch the illegal reference. This option
tells gcc to inline less (but it does result in a larger kernel).
from one section to another. During linktime or runtime, some
sections are dropped; any use of code/data previously in these
sections would most likely result in an oops.
In the code, functions and variables are annotated with __init,
__initdata, and so on (see the full list in include/linux/init.h).
This directs the toolchain to place code/data in specific sections.
The section mismatch analysis is always performed after a full
kernel build, and enabling this option causes the option
-fno-inline-functions-called-once to be added to gcc commands.
However, when inlining a function annotated with __init in
a non-init function, we would lose the section information and thus
the analysis would not catch the illegal reference. This option
tells gcc to inline less (but it does result in a larger kernel).
