aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-xtensa.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2003-07-18 21:09:28 +0000
committerRichard Henderson <rth@redhat.com>2003-07-18 21:09:28 +0000
commit986a241f8b043a790a63bc4e96bb731973a61ff4 (patch)
tree83a1a719061def9eab539e87e9de1f84059395d1 /bfd/elf32-xtensa.c
parent22b0d388c7f3d6271df8e2193a1c4f4d4a7d973d (diff)
downloadgdb-986a241f8b043a790a63bc4e96bb731973a61ff4.zip
gdb-986a241f8b043a790a63bc4e96bb731973a61ff4.tar.gz
gdb-986a241f8b043a790a63bc4e96bb731973a61ff4.tar.bz2
* elflink.c (_bfd_elf_dynamic_symbol_p): New.
* elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it. (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it. * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise. * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise. * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise. * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise. Update all callers to provide the relocation being resolved.
Diffstat (limited to 'bfd/elf32-xtensa.c')
-rw-r--r--bfd/elf32-xtensa.c35
1 files changed, 3 insertions, 32 deletions
diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c
index f68f342..867832f 100644
--- a/bfd/elf32-xtensa.c
+++ b/bfd/elf32-xtensa.c
@@ -1838,38 +1838,9 @@ xtensa_elf_dynamic_symbol_p (info, h)
struct bfd_link_info *info;
struct elf_link_hash_entry *h;
{
- if (h == NULL)
- return FALSE;
-
- while (h->root.type == bfd_link_hash_indirect
- || h->root.type == bfd_link_hash_warning)
- h = (struct elf_link_hash_entry *) h->root.u.i.link;
-
- if (h->dynindx == -1)
- return FALSE;
-
- if (h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_defweak)
- return TRUE;
-
- switch (ELF_ST_VISIBILITY (h->other))
- {
- case STV_DEFAULT:
- break;
- case STV_HIDDEN:
- case STV_INTERNAL:
- return FALSE;
- case STV_PROTECTED:
- if (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- return FALSE;
- break;
- }
-
- if ((info->shared && !info->symbolic)
- || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
- return TRUE;
-
- return FALSE;
+ /* ??? What, if anything, needs to happen wrt STV_PROTECTED and PLT
+ entries? For now assume the worst. */
+ return _bfd_elf_dynamic_symbol_p (h, info, 1);
}