* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
authorRichard Henderson <rth@redhat.com>
Fri, 9 Feb 2001 00:29:58 +0000 (00:29 +0000)
committerRichard Henderson <rth@redhat.com>
Fri, 9 Feb 2001 00:29:58 +0000 (00:29 +0000)
        before visibility.  Locally defined protected symbols are not
        dynamic.

bfd/ChangeLog
bfd/elf64-alpha.c

index 9c15c7b9a94542ca0b56214f9ce58a8752756ea0..f64124e8549e4319f81d1323d9816e473e669811 100644 (file)
@@ -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
index 9808c8f2e31c3afbcf9202dadba60ecd1fa1373f..28f0f4c2948dccf4ea56e252f3e2ead3f6e95a2b 100644 (file)
@@ -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))
This page took 0.035183 seconds and 4 git commands to generate.