2006-05-15 Paul Brook <paul@codesourcery.com>
[deliverable/binutils-gdb.git] / bfd / cpu-arm.c
index 0f0da060976d886d41949ef5cefd4aca5b475860..5c89296c08a5d37a320c4086548bed26f8c99cb5 100644 (file)
@@ -402,14 +402,22 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section)
 }
 
 bfd_boolean
-bfd_is_arm_mapping_symbol_name (const char * name)
+bfd_is_arm_special_symbol_name (const char * name, int type)
 {
   /* The ARM compiler outputs several obsolete forms.  Recognize them
      in addition to the standard $a, $t and $d.  We are somewhat loose
      in what we accept here, since the full set is not documented.  */
-  return (name != NULL)
-    && (name[0] == '$')
-    && (name[1] >= 'a' && name[1] <= 'z')
-    && (name[2] == 0 || name[2] == '.');
+  if (!name || name[0] != '$')
+    return FALSE;
+  if (name[1] == 'a' || name[1] == 't' || name[1] == 'd')
+    type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP;
+  else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p')
+    type &= BFD_ARM_SPECIAL_SYM_TYPE_TAG;
+  else if (name[1] >= 'a' && name[1] <= 'z')
+    type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER;
+  else
+    return FALSE;
+
+  return (type != 0 && (name[2] == 0 || name[2] == '.'));
 }
 
This page took 0.048641 seconds and 4 git commands to generate.