On Fri, Feb 21, 2025 at 02:20:41PM +0530, Sathvika Vasireddy wrote:
@@ -1625,6 +1626,11 @@ static int add_call_destinations(struct objtool_file *file)This won't work on x86, where an intra-function call is converted to a
reloc = insn_reloc(file, insn);
if (!reloc) {
dest_off = arch_jump_destination(insn);
+
+ next_insn = next_insn_same_func(file, insn);
+ if (next_insn && dest_off == next_insn->offset)
+ continue;
+
stack-modifying JUMP. So this should probably be checked in an
arch-specific function.
Thanks for letting me know, I'll introduce arch_skip_call_warning() to
handle architecture specific cases in the next patch I send.
Can't you detect this pattern in decode and simpy not emit the call
instruction?