This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PATCH: PR ld/11413: --no-export-dynamic broken for PIE?
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org
- Date: Sun, 21 Mar 2010 12:31:31 -0700
- Subject: PATCH: PR ld/11413: --no-export-dynamic broken for PIE?
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
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;
}