2006-03-09 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Thu, 9 Mar 2006 23:05:59 +0000 (23:05 +0000)
committerPaul Brook <paul@codesourcery.com>
Thu, 9 Mar 2006 23:05:59 +0000 (23:05 +0000)
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
bfd/cpu-arm.c
gas/testsuite/ChangeLog
gas/testsuite/gas/arm/nomapping.d [new file with mode: 0644]
gas/testsuite/gas/arm/nomapping.s [new file with mode: 0644]

index 49d65ce198a06509a77796a1f6d9a1fd818d63ae..4166c678b52850fd7da0b6f4caa2e6b503f22478 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-09  Paul Brook  <paul@codesourcery.com>
+
+       * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
+       mapping symbols.
+
 2006-03-09  Khem Raj  <khem@mvista.com>
 
        * elf32-arm.c(elf32_arm_finish_dynamic_sections): Use unsigned
index 3f56e8f9a62f64ba589048561c83185bc6078cd9..a28a1f9e8fcfeb805722019ed6cd230a53237d58 100644 (file)
@@ -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] == '.');
 }
 
index e4cf9a42527a8099a01e587b9b85b387eb870a3c..bd72b8466f5b8517feb6c016c33b7f6f9278e977 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-09  Paul Brook  <paul@codesourcery.com>
+
+       * gas/arm/nomapping.d: New test.
+       * gas/arm/nomapping.s: New test.
+
 2006-03-07  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/2428
diff --git a/gas/testsuite/gas/arm/nomapping.d b/gas/testsuite/gas/arm/nomapping.d
new file mode 100644 (file)
index 0000000..76f2833
--- /dev/null
@@ -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 (file)
index 0000000..efe92ae
--- /dev/null
@@ -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: