aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2001-02-09 00:29:58 +0000
committerRichard Henderson <rth@redhat.com>2001-02-09 00:29:58 +0000
commitca88208ac8ae9caab05dc80c5ccca650cb156a60 (patch)
tree2d0176bfb2c4ee60c7603b91a498981eb3a171d3
parent4603e845c0cb35b7755f1d86c0336821fbac8c4c (diff)
downloadgdb-ca88208ac8ae9caab05dc80c5ccca650cb156a60.zip
gdb-ca88208ac8ae9caab05dc80c5ccca650cb156a60.tar.gz
gdb-ca88208ac8ae9caab05dc80c5ccca650cb156a60.tar.bz2
* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
before visibility. Locally defined protected symbols are not dynamic.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-alpha.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9c15c7b..f64124e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-08 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
+ before visibility. Locally defined protected symbols are not
+ dynamic.
+
2001-02-08 Geoffrey Keating <geoffk@redhat.com>
* config.bfd: Enable coff64 for rs6000-*. Patch from
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 9808c8f..28f0f4c 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -240,17 +240,24 @@ alpha_elf_dynamic_symbol_p (h, info)
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_INTERNAL:
+ 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 (h->root.type == bfd_link_hash_undefweak
- || h->root.type == bfd_link_hash_defweak)
- return true;
-
if ((info->shared && !info->symbolic)
|| ((h->elf_link_hash_flags
& (ELF_LINK_HASH_DEF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR))