aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2005-03-30 16:22:07 +0000
committerJulian Brown <julian@codesourcery.com>2005-03-30 16:22:07 +0000
commit9d2da7ca8d6d5955d0c72566c490b2dcd091abf9 (patch)
treec076395d1c7df08f955299dd1f0457f8458049da /bfd/elf32-arm.c
parent74ec5579b91e2275ecb67a8c91311506f6b8bd32 (diff)
downloadgdb-9d2da7ca8d6d5955d0c72566c490b2dcd091abf9.zip
gdb-9d2da7ca8d6d5955d0c72566c490b2dcd091abf9.tar.gz
gdb-9d2da7ca8d6d5955d0c72566c490b2dcd091abf9.tar.bz2
* bfd/bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
* bfd/bfd-in2.h: Regenerate. * bfd/elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to bfd_elf32_is_arm_mapping_symbol_name. (elf32_arm_output_symbol_hook): Likewise. (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for mapping symbols. (is_arm_mapping_symbol_name): Function moved from here... * bfd/cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed and made global. * gas/config/tc-arm.c (mapping_state): Change documentation in function comment to cross-reference spec instead. Change type of mapping symbols to BSF_NO_TYPE. (arm_adjust_symtab): Don't change type of mapping symbols here. * gas/testsuite/gas/arm/mapping.d: Update expected output. * ld/testsuite/ld-arm/arm-app-abs32.d: Likewise. * ld/testsuite/ld-arm/arm-app.d: Likewise. * ld/testsuite/ld-arm/mixed-app.d: Likewise.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 7464bbe..fb46d7c 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -4705,21 +4705,12 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info,
return TRUE;
}
-static bfd_boolean
-is_arm_mapping_symbol_name (const char * name)
-{
- return (name != NULL)
- && (name[0] == '$')
- && ((name[1] == 'a') || (name[1] == 't') || (name[1] == 'd'))
- && (name[2] == 0);
-}
-
/* Treat mapping symbols as special target symbols. */
static bfd_boolean
elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym)
{
- return is_arm_mapping_symbol_name (sym->name);
+ return bfd_elf32_is_arm_mapping_symbol_name (sym->name);
}
/* This is a copy of elf_find_function() from elf.c except that
@@ -4754,12 +4745,12 @@ arm_elf_find_function (bfd * abfd ATTRIBUTE_UNUSED,
break;
case STT_FUNC:
case STT_ARM_TFUNC:
+ case STT_NOTYPE:
/* Skip $a and $t symbols. */
if ((q->symbol.flags & BSF_LOCAL)
- && is_arm_mapping_symbol_name (q->symbol.name))
+ && bfd_elf32_is_arm_mapping_symbol_name (q->symbol.name))
continue;
/* Fall through. */
- case STT_NOTYPE:
if (bfd_get_section (&q->symbol) == section
&& q->symbol.value >= low_func
&& q->symbol.value <= offset)
@@ -6086,7 +6077,7 @@ elf32_arm_output_symbol_hook (struct bfd_link_info *info,
return TRUE;
/* We only want mapping symbols. */
- if (! is_arm_mapping_symbol_name (name))
+ if (! bfd_elf32_is_arm_mapping_symbol_name (name))
return TRUE;
mapcount = ++(elf32_arm_section_data (input_sec)->mapcount);