RFC: AArch64 Disassembler: Annotate undefined instructions
Nick Clifton
nickc@redhat.com
Wed Apr 29 11:03:03 GMT 2026
Hi Richard,
>> OK, that makes sense. So the disassembler should check to see if closest
>> previous mapping symbol is $d and only proceed with the annotation in this
>> case, yes ?
> Do you even need to do that? Just annotate the disassembly of .word values.
But the disassembler only knows if an "undefined" instruction is actually
meant to be data by looking at the mapping symbols.
This is the test that I am now using in the v2 version of the patch (not
posted yet as I am waiting to see if there are more comments):
/* See if this "undefined instruction" is actually the address of something. */
if (annotate_undefined_insns
/* Skip values that have been explicitly tagged as code. */
&& last_type == MAP_DATA
/* Skip static object files as symbol values have not be resolved yet. */
&& info->section != NULL
&& info->section->owner != NULL
&& (info->section->owner->flags & (EXEC_P | DYNAMIC)))
{ ... do the annotation ... }
> Though I suspect you'll need to look at 64-bit quantities on a 64-bit machine.
> 32-bit values aren't addresses.
Can you get 32-bit undefined AArch64 instructions ? The patch only annotates
the disassembler's output for undefined instructions, so if it displaying something
else then nothing new will happen.
Cheers
Nick
More information about the Binutils
mailing list