2005-07-07 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 7 Jul 2005 17:44:58 +0000 (17:44 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 7 Jul 2005 17:44:58 +0000 (17:44 +0000)
PR 975
* elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
symbol with default visibility is local.

bfd/ChangeLog
bfd/elflink.c

index 04421f4330cd67ce061dce8194d072ad650d4f86..8bc764485cd8c36aecc5d808d4563386cae52aa1 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR 975
+       * elflink.c (_bfd_elf_symbol_refs_local_p): Only undefined
+       symbol with default visibility is local.
+
 2005-07-07  Ben Elliston  <bje@gnu.org>
 
        * config.bfd: Mark m68*-*-rtemscoff as obsolete.
index 6177f5324e411828c210b55417e4d31d870a0732..4fac5ae7cadeb9fcbddf4ed896e18355028617e1 100644 (file)
@@ -2572,8 +2572,10 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h,
   if (ELF_COMMON_DEF_P (h))
     /* Do nothing.  */;
   /* If we don't have a definition in a regular file, then we can't
-     resolve locally.  The sym is either undefined or dynamic.  */
-  else if (!h->def_regular)
+     resolve locally unless it has non-default visibility .  The sym
+     is either undefined or dynamic.  */
+  else if (!h->def_regular
+          && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
     return FALSE;
 
   /* Forced local symbols resolve locally.  */
This page took 0.034877 seconds and 4 git commands to generate.