[0/2] arm, objdump: Make objdump use bfd's machine detection to drive disassembly

Message ID 20241031113500.3685068-1-andre.simoesdiasvieira@arm.com
Headers
Series arm, objdump: Make objdump use bfd's machine detection to drive disassembly |

Message

Andre Vieira (lists) Oct. 31, 2024, 11:34 a.m. UTC
  Hi,

Let's try this again, my previous attempt to email this series failed
somewhat...

This patch series makes objdump use build attributes or notes if present to
determine the architecture to disassembly for. This is a deviation from the
existing behaviour where it would attempt to disassemble for all known
A-profile instructions, which would lead to inaccuracies with earlier
architectures and even wrong assembly when disassembling an Armv8.1-M Mainline
object file/binary.

The first patch does the bulk of the work and the second cleans up the 26-bit
instruction disassembly to warn developers of obsolote behaviour.

Tested series on gas for arm-none-eabi, arm-wince and arm-vxworks.

Andre Vieira (2):
  arm, objdump: Make objdump use bfd's machine detection to drive
    disassembly
  arm, objdump: print obsolote warning when 26-bit set in instructions

 gas/testsuite/gas/arm/armv1.d         |  8 ++--
 gas/testsuite/gas/arm/inst.d          | 32 +++++++--------
 gas/testsuite/gas/arm/nops.d          |  1 +
 gas/testsuite/gas/arm/pinsn.d         | 24 -----------
 gas/testsuite/gas/arm/pinsn.s         | 16 --------
 gas/testsuite/gas/arm/unpredictable.d |  1 +
 gas/testsuite/gas/arm/wince_inst.d    | 32 +++++++--------
 include/opcode/arm.h                  |  4 +-
 opcodes/arm-dis.c                     | 58 ++++++++++++++-------------
 9 files changed, 70 insertions(+), 106 deletions(-)
 delete mode 100644 gas/testsuite/gas/arm/pinsn.d
 delete mode 100644 gas/testsuite/gas/arm/pinsn.s