Re: odd objtool 'unreachable instruction' warning
From: Linus Torvalds
Date: Thu Nov 06 2025 - 19:05:29 EST
On Wed, 5 Nov 2025 at 11:51, David Sterba <dsterba@xxxxxxx> wrote:
>
> FWIW, 'objdump --visualize-jumps' shows the arrows, with
> '--visualize-jumps=extended-color' they're colored and it's readable.
Hey, hey, hey - when did that happen? I've clearly not read the
man-page in ages.
Because that's _almost_ lovely. If objdump just handled relocations
more sanely, it would be really nice.
[ Looking around in the binutil sources, it's been there for five
years, and was in the 2.34 release ]
Because of the insanity of relocation handling, it shows regular
"call" and "jmp" instructions out of the function as branches to the
next instruction (because that's the non-relocated info).
And because it puts the visualized things in front of the
instructions, the end result has strange random indentation depending
on complexity of the function.
But it's tantalizingly close to great, and it's certainly an
improvement over not having that at all.
Added to my "disassemble" alias.
Linus