summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJosh Poimboeuf <jpoimboe@redhat.com>2017-11-06 07:17:37 -0600
committerIngo Molnar <mingo@kernel.org>2017-11-07 10:48:22 +0100
commitd0c2e691d1cbe43662df3a08a4933f13acc352c3 (patch)
tree9acca2fce0d50dcac9a56cc486f101b30583e1d3 /include/linux
parent783711f0d2458ca1bd716000e767c478cef27144 (diff)
downloadlinux-d0c2e691d1cbe43662df3a08a4933f13acc352c3.tar.gz
linux-d0c2e691d1cbe43662df3a08a4933f13acc352c3.tar.bz2
linux-d0c2e691d1cbe43662df3a08a4933f13acc352c3.zip
objtool: Add a comment for the unreachable annotation macros
Add a comment for the unreachable annotation macros to explain their purpose and the '__COUNTER__' label hack. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1570e48d9f87e0fc6f0126c32e7e1de6e109cb67.1509974104.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/compiler.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 202710420d6d..f8734fca54ce 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -187,6 +187,11 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
/* Unreachable code */
#ifdef CONFIG_STACK_VALIDATION
+/*
+ * These macros help objtool understand GCC code flow for unreachable code.
+ * The __COUNTER__ based labels are a hack to make each instance of the macros
+ * unique, to convince GCC not to merge duplicate inline asm statements.
+ */
#define annotate_reachable() ({ \
asm("%c0:\n\t" \
".pushsection .discard.reachable\n\t" \