This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR ld/11413: --no-export-dynamic broken for PIE?


Hi,

This patch checks !executable instead of shared. OK to install?

Thanks.


H.J.
---
2010-03-21  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/11413
	* elflink.c (_bfd_elf_add_default_symbol): Check !executable
	instead of shared.

diff --git a/bfd/elflink.c b/bfd/elflink.c
index 8f6b5f4..98ea753 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -1715,7 +1715,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
 	{
 	  if (! dynamic)
 	    {
-	      if (info->shared
+	      if (! info->executable
 		  || hi->ref_dynamic)
 		*dynsym = TRUE;
 	    }
@@ -1784,7 +1784,7 @@ nondefault:
 	    {
 	      if (! dynamic)
 		{
-		  if (info->shared
+		  if (! info->executable
 		      || hi->ref_dynamic)
 		    *dynsym = TRUE;
 		}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]