From 384060486dd68b7a2ac169b5be59ae7a539b36f8 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 9 Mar 2006 23:05:59 +0000 Subject: [PATCH] 2006-03-09 Paul Brook bfd/ * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional mapping symbols. gas/testsuite/ * gas/arm/nomapping.d: New test. * gas/arm/nomapping.s: New test. --- bfd/ChangeLog | 5 +++++ bfd/cpu-arm.c | 7 +++++-- gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/arm/nomapping.d | 8 ++++++++ gas/testsuite/gas/arm/nomapping.s | 19 +++++++++++++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/arm/nomapping.d create mode 100644 gas/testsuite/gas/arm/nomapping.s diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 49d65ce198a..4166c678b52 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2006-03-09 Paul Brook + + * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional + mapping symbols. + 2006-03-09 Khem Raj * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index 3f56e8f9a62..a28a1f9e8fc 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -404,9 +404,12 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section) bfd_boolean bfd_is_arm_mapping_symbol_name (const char * name) { + /* The ARM compiler outputs several obsolete forms. Recognize them + in addition to the standard $a, $t and $d. */ return (name != NULL) && (name[0] == '$') - && ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd')) - && (name[2] == 0); + && ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd') + || (name[1] == 'm') || (name[1] == 'f') || (name[1] == 'p')) + && (name[2] == 0 || name[2] == '.'); } diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index e4cf9a42527..bd72b8466f5 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-03-09 Paul Brook + + * gas/arm/nomapping.d: New test. + * gas/arm/nomapping.s: New test. + 2006-03-07 H.J. Lu PR binutils/2428 diff --git a/gas/testsuite/gas/arm/nomapping.d b/gas/testsuite/gas/arm/nomapping.d new file mode 100644 index 00000000000..76f283345e1 --- /dev/null +++ b/gas/testsuite/gas/arm/nomapping.d @@ -0,0 +1,8 @@ +#nm: -n +#name: ARM Mapping Symbols Ignored +# This test is only valid on ELF based ports. +#not-target: *-*-*coff *-*-pe *-*-wince *-*-*aout* *-*-netbsd *-*-riscix* + +# Check ARM ELF Mapping Symbols are ignored properly +0+0 t sym1 +0+c t sym2 diff --git a/gas/testsuite/gas/arm/nomapping.s b/gas/testsuite/gas/arm/nomapping.s new file mode 100644 index 00000000000..efe92ae57e1 --- /dev/null +++ b/gas/testsuite/gas/arm/nomapping.s @@ -0,0 +1,19 @@ + .text + .arm +sym1: + nop + .thumb + nop + nop +$a.foo: +$t.foo: +$d.foo: +@ Obsolete mapping symbols generated by armcc. +$m: +$m.foo: +$f: +$f.foo: +$p: +$p.foo: + .word 0 +sym2: -- 2.30.2