Re: [PATCH v4 02/10] objtool: Handle special cases of dead end insn
From: Tiezhu Yang
Date: Wed Nov 27 2024 - 00:46:17 EST
On 11/26/2024 11:22 PM, Peter Zijlstra wrote:
I was poking at the reachable annotations and ended up with this:
Also see here:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/log/?h=objtool/core
Once the robots agree it all compiles, I'll post.
There are many changes of tools/objtool/check.c in your tree,
I assume the patches in objtool/core tree is to target 6.13-rc1,
it failed when compiling on LoongArch:
arch/loongarch/include/asm/bug.h:49:60: error: expected ‘:’ or ‘)’
before ‘;’ token
{standard input}:682: Error: no match insn: break 1.pushsection
.discard.annotate_insn,"M",@progbits,8
I think it needs to do the following changes, please squash them to
your original commit if possible, thanks.
diff --git a/arch/loongarch/include/asm/bug.h
b/arch/loongarch/include/asm/bug.h
index dfb0cfccf36e..e5d888cb738f 100644
--- a/arch/loongarch/include/asm/bug.h
+++ b/arch/loongarch/include/asm/bug.h
@@ -40,13 +40,14 @@
#define __BUG_FLAGS(flags, extra) \
asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags)) \
+ "\n" \
extra);
#define __WARN_FLAGS(flags) \
do { \
instrumentation_begin(); \
__BUG_FLAGS(BUGFLAG_WARNING|(flags), \
- __ANNOTATE_REACHABLE(__ASM_BREF(10001)); \
+ __ANNOTATE_REACHABLE(__ASM_BREF(10001))); \
instrumentation_end(); \
} while (0)
By the way, there are a lot of new objtool warnings
Unkonwn annotation type: 8
on LoongArch when compiling the code of your tree.
Thanks,
Tiezhu