This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[patch] Arm mapping symbols
- From: Paul Brook <paul at nowt dot org>
- To: binutils at sourceware dot org
- Date: Wed, 8 Mar 2006 19:53:05 +0000
- Subject: [patch] Arm mapping symbols
The Arm compiler generates the obsolete $m, $f and $p mapping symbols in
addition to the standard $a, $t and $d.
Symbols of the form $<letter>.<anything> are also considered mapping symbols.
The patch below tweaks BFD to recognise these additional forms.
Tested with cross to arm-none-eabi.
Ok?
2006-03-08 Paul Brook <paul@codesourcery.com>
* cpu-arm.c (bfd_is_arm_mapping_symbol_name): Recognise additional
mapping symbols.
Index: bfd/cpu-arm.c
===================================================================
RCS file: /var/cvsroot/src-cvs/src/bfd/cpu-arm.c,v
retrieving revision 1.19
diff -u -p -r1.19 cpu-arm.c
--- bfd/cpu-arm.c 4 May 2005 15:53:05 -0000 1.19
+++ bfd/cpu-arm.c 8 Mar 2006 19:37:08 -0000
@@ -404,9 +404,12 @@ bfd_arm_get_mach_from_notes (bfd *abfd,
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] == '.');
}