summaryrefslogtreecommitdiff
path: root/bfd/elf64-hppa.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
commit353649de1dd5da7623fd267324cb0f5685ccc266 (patch)
treecef7f92506a80b5f1a3f24ad9ef894f71f59033c /bfd/elf64-hppa.c
parent15d22b09d8f6cbf9fb7f72bb1ee363b51dfeb1d6 (diff)
downloadbinutils-redhat-353649de1dd5da7623fd267324cb0f5685ccc266.tar.gz
* 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/elf64-hppa.c')
-rw-r--r--bfd/elf64-hppa.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c
index 4c88a543a3..2cee551d6b 100644
--- a/bfd/elf64-hppa.c
+++ b/bfd/elf64-hppa.c
@@ -956,30 +956,19 @@ elf64_hppa_dynamic_symbol_p (h, info)
struct elf_link_hash_entry *h;
struct bfd_link_info *info;
{
- 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;
+ /* ??? What, if anything, needs to happen wrt STV_PROTECTED symbols
+ and relocations that retrieve a function descriptor? Assume the
+ worst for now. */
+ if (_bfd_elf_dynamic_symbol_p (h, info, 1))
+ {
+ /* ??? Why is this here and not elsewhere is_local_label_name. */
+ if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
+ return FALSE;
- if (h->root.root.string[0] == '$' && h->root.root.string[1] == '$')
+ return TRUE;
+ }
+ else
return FALSE;
-
- if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
- || ((h->elf_link_hash_flags
- & (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))
- == (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR)))
- return TRUE;
-
- return FALSE;
}
/* Mark all funtions exported by this file so that we can later allocate