diff options
author | Paul Brook <paul@codesourcery.com> | 2006-05-15 19:57:35 +0000 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2006-05-15 19:57:35 +0000 |
commit | b07969118378598261be761f87630385a7627879 (patch) | |
tree | e37af3c7597e738eabce65b7b9c4222af874524e /bfd/cpu-arm.c | |
parent | 4e8d927dded819785e749c571f5b6a495a425432 (diff) | |
download | gdb-b07969118378598261be761f87630385a7627879.zip gdb-b07969118378598261be761f87630385a7627879.tar.gz gdb-b07969118378598261be761f87630385a7627879.tar.bz2 |
2006-05-15 Paul Brook <paul@codesourcery.com>
bfd/
* cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename ...
(bfd_is_arm_special_symbol_name): ... to this. Add type argument.
Check symbol name is of specified type.
* elf32-arm.c (elf32_arm_is_target_special_symbol,
arm_elf_find_function, elf32_arm_output_symbol_hook): Use
bfd_is_arm_special_symbol_name.
* bfd-in.h (BFD_ARM_SPECIAL_SYM_TYPE_MAP,
BFD_ARM_SPECIAL_SYM_TYPE_TAG, BFD_ARM_SPECIAL_SYM_TYPE_OTHER,
BFD_ARM_SPECIAL_SYM_TYPE_ANY): Define.
(bfd_is_arm_mapping_symbol_name): Remove prototype.
(bfd_is_arm_special_symbol_name): Add prototype.
* bfd-in2.h: Regenerate.
gas/
* config/tc-arm.c (arm_adjust_symtab): Use
bfd_is_arm_special_symbol_name.
ld/testsuite/
* ld-arm/arm-be8.d: New test.
* ld-arm/arm-be8.s: New test.
* ld-arm/arm-elf.exp: Add arm-be8.
Diffstat (limited to 'bfd/cpu-arm.c')
-rw-r--r-- | bfd/cpu-arm.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index 0f0da06..5c89296 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -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] == '.')); } |