summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2005-07-07 17:44:58 +0000
committerH.J. Lu <hjl.tools@gmail.com>2005-07-07 17:44:58 +0000
commit9968d831f9298e2dc60de7a77013c7b173441951 (patch)
treeb475808d4923f63e859f2af43cb685936f48b480 /bfd
parentb2edd3b5c7defda7924d0163210979010b4441e3 (diff)
downloadbinutils-9968d831f9298e2dc60de7a77013c7b173441951.tar.gz
binutils-9968d831f9298e2dc60de7a77013c7b173441951.tar.bz2
binutils-9968d831f9298e2dc60de7a77013c7b173441951.zip
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.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 04421f4330c..8bc764485cd 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 6177f5324e4..4fac5ae7cad 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -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. */