Commit e809ab01 authored by Michael Witten's avatar Michael Witten Committed by Jiri Kosina

Kconfig: Copyedit: DEBUG_SECTION_MISMATCH

Signed-off-by: default avatarMichael Witten <mfwitten@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 2fe038e3
...@@ -117,31 +117,31 @@ config DEBUG_SECTION_MISMATCH ...@@ -117,31 +117,31 @@ config DEBUG_SECTION_MISMATCH
help help
The section mismatch analysis checks if there are illegal The section mismatch analysis checks if there are illegal
references from one section to another section. references from one section to another section.
Linux will during link or during runtime drop some sections During linktime or runtime, some sections are dropped;
and any use of code/data previously in these sections will any use of code/data previously in these sections would
most likely result in an oops. most likely result in an oops.
In the code functions and variables are annotated with In the code, functions and variables are annotated with
__init, __devinit etc. (see full list in include/linux/init.h) __init, __devinit, etc. (see the full list in include/linux/init.h),
which results in the code/data being placed in specific sections. which results in the code/data being placed in specific sections.
The section mismatch analysis is always done after a full The section mismatch analysis is always performed after a full
kernel build but enabling this option will in addition kernel build, and enabling this option causes the following
do the following: additional steps to occur:
- Add the option -fno-inline-functions-called-once to gcc - Add the option -fno-inline-functions-called-once to gcc commands.
When inlining a function annotated __init in a non-init When inlining a function annotated with __init in a non-init
function we would lose the section information and thus function, we would lose the section information and thus
the analysis would not catch the illegal reference. the analysis would not catch the illegal reference.
This option tells gcc to inline less but will also This option tells gcc to inline less (but it does result in
result in a larger kernel. a larger kernel).
- Run the section mismatch analysis for each module/built-in.o - Run the section mismatch analysis for each module/built-in.o file.
When we run the section mismatch analysis on vmlinux.o we When we run the section mismatch analysis on vmlinux.o, we
lose valueble information about where the mismatch was lose valueble information about where the mismatch was
introduced. introduced.
Running the analysis for each module/built-in.o file Running the analysis for each module/built-in.o file
will tell where the mismatch happens much closer to the tells where the mismatch happens much closer to the
source. The drawback is that we will report the same source. The drawback is that the same mismatch is
mismatch at least twice. reported at least twice.
- Enable verbose reporting from modpost to help solving - Enable verbose reporting from modpost in order to help resolve
the section mismatches reported. the section mismatches that are reported.
config DEBUG_KERNEL config DEBUG_KERNEL
bool "Kernel debugging" bool "Kernel debugging"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment