public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: PR 679: Support protected non-function symbols
@ 2005-01-19  0:15 H. J. Lu
  2005-01-19  1:21 ` Alan Modra
  0 siblings, 1 reply; 2+ messages in thread
From: H. J. Lu @ 2005-01-19  0:15 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: PR 679: Support protected non-function symbols
  2005-01-19  0:15 PATCH: PR 679: Support protected non-function symbols H. J. Lu
@ 2005-01-19  1:21 ` Alan Modra
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2005-01-19  1:21 UTC (permalink / raw)
  To: H. J. Lu; +Cc: binutils

On Tue, Jan 18, 2005 at 04:14:21PM -0800, H. J. Lu wrote:
> 	PR 679
> 	* elflink.c (_bfd_elf_symbol_refs_local_p): Return TRUE for
> 	protected non-function symbols.

OK, but please apply a similar fix to _bfd_elf_dynamic_symbol_p.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-19  1:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-19  0:15 PATCH: PR 679: Support protected non-function symbols H. J. Lu
2005-01-19  1:21 ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).