diff options
author | Nick Clifton <nickc@redhat.com> | 2022-11-21 16:44:02 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-11-21 16:44:02 +0000 |
commit | 1a7e622b82fa621ab505dd911bc30c1efcb4a9b0 (patch) | |
tree | 6736a37fd2c9c46a1de07f4b847087e11af15797 /bfd | |
parent | b0b23e06c3a2e3b92d6f12d99650c7d1cc5d939c (diff) | |
download | gdb-1a7e622b82fa621ab505dd911bc30c1efcb4a9b0.zip gdb-1a7e622b82fa621ab505dd911bc30c1efcb4a9b0.tar.gz gdb-1a7e622b82fa621ab505dd911bc30c1efcb4a9b0.tar.bz2 |
Fix ARM and AArch64 assembler tests to work in a multi-arch environment.
PR 29764
gas * testsuite/gas/arm/cpu-cortex-a76ae.d: Add arm prefix to the -m
option passed to objdump.
* testsuite/gas/arm/cpu-cortex-a77.d: Likewise.
* testsuite/gas/aarch64/cpu-cortex-a76ae.d: Add aarch64 prefix to
the -m option passed to objdump.
* testsuite/gas/aarch64/cpu-cortex-a77.d: Likewise.
bfd * cpu-arm.c (scan): Accept machine names prefixed with "arm:".
* cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:".
bin * doc/binutils.texi (objdump): Note that the -m option supports
the <architecture>:<machine> syntax.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/cpu-aarch64.c | 9 | ||||
-rw-r--r-- | bfd/cpu-arm.c | 9 |
3 files changed, 24 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 06501775..24aa783 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2022-11-21 Nick Clifton <nickc@redhat.com> + + PR 29764 + * cpu-arm.c (scan): Accept machine names prefixed with "arm:". + * cpu-aarch64.c (scan): Accept machine names prefixed with "aarch64:". + 2022-10-19 Nick Clifton <nickc@redhat.com> PR 29699 diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c index eb88d0e..d51f2e3 100644 --- a/bfd/cpu-aarch64.c +++ b/bfd/cpu-aarch64.c @@ -85,6 +85,15 @@ scan (const struct bfd_arch_info *info, const char *string) if (strcasecmp (string, info->printable_name) == 0) return true; + /* If there is a prefix of "aarch64:" then skip it. */ + const char * colon; + if ((colon = strchr (string, ':')) != NULL) + { + if (strncasecmp (string, "aarch64", colon - string) != 0) + return false; + string = colon + 1; + } + /* Next check for a processor name instead of an Architecture name. */ for (i = sizeof (processors) / sizeof (processors[0]); i--;) { diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index 853a118..6d77e12 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -210,6 +210,15 @@ scan (const struct bfd_arch_info *info, const char *string) if (strcasecmp (string, info->printable_name) == 0) return true; + /* If there is a prefix of "arm:" then skip it. */ + const char * colon; + if ((colon = strchr (string, ':')) != NULL) + { + if (strncasecmp (string, "arm", colon - string) != 0) + return false; + string = colon + 1; + } + /* Next check for a processor name instead of an Architecture name. */ for (i = sizeof (processors) / sizeof (processors[0]); i--;) { |