binutils-gdb/ld/testsuite
Andre Vieira 2c9d089c90 arm, objdump: Make objdump use bfd's machine detection to drive disassembly
For any arm elf target, disable an old piece of code that forced disassembly to
disassemble for 'unknown architecture' which once upon a time meant it would
disassemble ANY arm instruction.  This is no longer true with the addition of
Armv8.1-M Mainline, as there are conflicting encodings for different thumb
instructions.

BFD however can detect what architecture the object file was assembled for
using information in the notes section.  So if available, we use that,
otherwise we default to the old 'unknown' behaviour.

With the changes above code, a mode changing 'bx lr' assembled for armv4 with
the option --fix-v4bx will result in an object file that is recognized by bfd
as one for the armv4 architecture.  The disassembler now disassembles this
encoding as a BX even for Armv4 architectures, but warns the user when
disassembling for Armv4 that this instruction is only valid from Armv4T
onwards.

Remove the unused and wrongfully defined ARM_ARCH_V8A_CRC, and
define and use a ARM_ARCH_V8R_CRC to make sure instructions enabled by
-march=armv8-r+crc are disassembled correctly.

Patch up some of the tests cases, see a brief explanation for each below.

inst.d:
This test checks the assembly & disassembly of basic instructions in armv3m. I
changed the expected behaviour for teqp, cmnp cmpp and testp instructions to
properly print p when disassembling, whereas before, in the 'unknown' case it
would disassemble these as UNPREDICTABLE as they were changed in later
architectures.

nops.d:
Was missing an -march, added one to make sure we were testing the right
behavior of NOP<c> instructions.

unpredictable.d:
Was missing an -march, added armv6 as that reproduced the behaviour being
tested.
2024-11-08 10:06:38 +00:00
..
config
ld-aarch64
ld-alpha
ld-arc
ld-arm arm, objdump: Make objdump use bfd's machine detection to drive disassembly 2024-11-08 10:06:38 +00:00
ld-auto-import
ld-avr
ld-bootstrap
ld-bpf
ld-cdtest
ld-checks
ld-cris
ld-crx
ld-csky
ld-ctf
ld-cygwin
ld-d10v
ld-discard
ld-dynamic
ld-elf ld-elf/pr25207.d: Pass --no-rosegment to ld 2024-10-31 05:04:15 +08:00
ld-elfcomm
ld-elfvers
ld-elfweak
ld-fastcall
ld-frv
ld-gc
ld-h8300
ld-i386
ld-ia64
ld-ifunc
ld-kvx
ld-libs
ld-linkonce
ld-loongarch-elf LoongArch: Check PC-relative relocations for shared libraries 2024-10-17 21:01:52 +08:00
ld-m68hc11
ld-m68k
ld-mep
ld-metag
ld-mips-elf
ld-misc
ld-mmix
ld-mn10300
ld-msp430-elf
ld-nds32
ld-nios2
ld-or1k
ld-pdp11
ld-pe
ld-pie
ld-plugin PR32300, --dependency-file: link dependencies are not all collected 2024-10-26 10:25:38 +10:30
ld-powerpc
ld-pru
ld-riscv-elf
ld-s12z
ld-s390
ld-scripts
ld-selective
ld-sframe
ld-sh
ld-shared
ld-size
ld-sparc
ld-spu
ld-srec
ld-tic6x
ld-tilegx
ld-tilepro
ld-undefined
ld-unique
ld-v850
ld-vax-elf
ld-visium
ld-vsb
ld-vxworks
ld-x86-64 ld: generate SFrame stack trace info for .plt.got 2024-11-01 15:36:35 -07:00
ld-xstormy16
ld-xtensa
ld-z8k
ld-z80
lib
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-9303