This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: PR 679: Support protected non-function symbols
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Tue, 18 Jan 2005 16:14:21 -0800
- Subject: PATCH: PR 679: Support protected non-function symbols
This patch fixes PR 679 for protected non-function symbols.
H.J.
----
2005-01-18 H.J. Lu <hongjiu.lu@intel.com>
PR 679
* elflink.c (_bfd_elf_symbol_refs_local_p): Return TRUE for
protected non-function symbols.
--- bfd/elflink.c.prot 2004-12-27 11:25:30.000000000 -0800
+++ bfd/elflink.c 2005-01-18 15:40:59.517703593 -0800
@@ -2542,6 +2542,10 @@ _bfd_elf_symbol_refs_local_p (struct elf
if (ELF_ST_VISIBILITY (h->other) != STV_PROTECTED)
return TRUE;
+ /* STV_PROTECTED non-function symbols are local. */
+ if (h->type != STT_FUNC)
+ return TRUE;
+
/* Function pointer equality tests may require that STV_PROTECTED
symbols be treated as dynamic symbols, even when we know that the
dynamic linker will resolve them locally. */