summaryrefslogtreecommitdiff
path: root/tools/objtool/Documentation
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@kernel.org>2023-04-19 00:27:50 +0300
committerJosh Poimboeuf <jpoimboe@kernel.org>2023-05-16 16:31:53 +0300
commitfedb724c3db5490234ddde0103811c28c2fedae0 (patch)
treeb3d61b25d2c2ba469a84f4aa2abc08270e2a42f5 /tools/objtool/Documentation
parentced23d2e3762ecfb859ae65d3a351218edff7205 (diff)
downloadlinux-fedb724c3db5490234ddde0103811c28c2fedae0.tar.xz
objtool: Detect missing __noreturn annotations
Most "unreachable instruction" warnings these days seem to actually be the result of a missing __noreturn annotation. Add an explicit check for that. Reviewed-by: Miroslav Benes <mbenes@suse.cz> Link: https://lore.kernel.org/r/6e2b93d8c65eaed6c4166a358269dc0ef01f890c.1681853186.git.jpoimboe@kernel.org Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Diffstat (limited to 'tools/objtool/Documentation')
-rw-r--r--tools/objtool/Documentation/objtool.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/objtool/Documentation/objtool.txt b/tools/objtool/Documentation/objtool.txt
index 9ec8cbf20668..f9345e0ce740 100644
--- a/tools/objtool/Documentation/objtool.txt
+++ b/tools/objtool/Documentation/objtool.txt
@@ -303,6 +303,12 @@ the objtool maintainers.
If it's not actually in a callable function (e.g. kernel entry code),
change ENDPROC to END.
+3. file.o: warning: objtool: foo+0x48c: bar() is missing a __noreturn annotation
+
+ The call from foo() to bar() doesn't return, but bar() is missing the
+ __noreturn annotation. NOTE: In addition to adding the __noreturn
+ annotation, the function name also needs to be added to
+ 'global_noreturns' in tools/objtool/check.c.
4. file.o: warning: objtool: func(): can't find starting instruction
or