diff options
author | Julian Brown <julian@codesourcery.com> | 2005-03-30 16:21:59 +0000 |
---|---|---|
committer | Julian Brown <julian@codesourcery.com> | 2005-03-30 16:21:59 +0000 |
commit | dfabe987bee62d24d6a366538794a9a3013ac3f2 (patch) | |
tree | 87ee16d2f9b79617e56da9699bf334c55d5e1658 | |
parent | 0ef8a7b573f40f4b3753a360cdcca20263760562 (diff) | |
download | gdb-dfabe987bee62d24d6a366538794a9a3013ac3f2.tar.gz |
* 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.
-rw-r--r-- | bfd/ChangeLog | 13 | ||||
-rw-r--r-- | bfd/bfd-in.h | 4 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 4 | ||||
-rw-r--r-- | bfd/cpu-arm.c | 10 | ||||
-rw-r--r-- | bfd/elf32-arm.c | 17 |
5 files changed, 35 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 146f92db8c1..f4c20a6e768 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,16 @@ +2005-03-30 Julian Brown <julian@codesourcery.com> + + * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype. + * bfd-in2.h: Regenerate. + * 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... + * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed + and made global. + 2005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com> * configure.in: Check for ffs decl and alphabetize. diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 0222a4e24a6..29c2780ddf1 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -824,6 +824,10 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +/* ELF ARM mapping symbol support */ +extern bfd_boolean bfd_elf32_is_arm_mapping_symbol_name + (const char * name); + /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines (bfd *, bfd *); diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 55492cb257f..2d40f43bdd2 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -831,6 +831,10 @@ extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); +/* ELF ARM mapping symbol support */ +extern bfd_boolean bfd_elf32_is_arm_mapping_symbol_name + (const char * name); + /* ARM Note section processing. */ extern bfd_boolean bfd_arm_merge_machines (bfd *, bfd *); diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index cd7c7a65575..cd09ed2df36 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -400,3 +400,13 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section) free (buffer); return bfd_mach_arm_unknown; } + +bfd_boolean +bfd_elf32_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); +} + diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 7464bbe0b26..fb46d7c28a3 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); |