This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Your patch on 2001-01-26 is bad


Hi, Richard,

Your change

2001-01-26  Richard Henderson  <rth@redhat.com>

        * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
        for non-default visibility.
        * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
        delete ugly macro and replace with pretty function.

is wrong. STV_PROTECTED has the global visibility. It is the dynamic
linker which handles it. Here is the fix. I will check them in in a
few minutes.

-- 
H.J. Lu (hjl@valinux.com)
---
2001-02-06  H.J. Lu  <hjl@gnu.org>

	* elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
	internal symbols are not dynamic.
	* elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.

Index: elfxx-ia64.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elfxx-ia64.c,v
retrieving revision 1.1.1.8
diff -u -p -r1.1.1.8 elfxx-ia64.c
--- elfxx-ia64.c	2001/02/03 22:52:35	1.1.1.8
+++ elfxx-ia64.c	2001/02/07 04:29:35
@@ -1181,8 +1181,12 @@ elfNN_ia64_dynamic_symbol_p (h, info)
 
   if (h->dynindx == -1)
     return false;
-  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-    return false;
+  switch (ELF_ST_VISIBILITY (h->other))
+    {
+    case STV_INTERNAL:
+    case STV_HIDDEN:
+      return false;
+    }
 
   if (h->root.type == bfd_link_hash_undefweak
       || h->root.type == bfd_link_hash_defweak)
Index: elf64-alpha.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elf64-alpha.c,v
retrieving revision 1.22
diff -u -p -r1.22 elf64-alpha.c
--- elf64-alpha.c	2001/02/03 23:13:19	1.22
+++ elf64-alpha.c	2001/02/07 04:30:24
@@ -240,8 +240,12 @@ alpha_elf_dynamic_symbol_p (h, info)
 
   if (h->dynindx == -1)
     return false;
-  if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)
-    return false;
+  switch (ELF_ST_VISIBILITY (h->other))
+    {
+    case STV_INTERNAL:
+    case STV_HIDDEN:
+      return false;
+    }
 
   if (h->root.type == bfd_link_hash_undefweak
       || h->root.type == bfd_link_hash_defweak)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]