PATCH: PR 679: Support protected non-function symbols

H. J. Lu hjl@lucon.org
Wed Jan 19 00:15:00 GMT 2005


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.  */



More information about the Binutils mailing list