aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2010-03-21 23:26:33 +0000
committerH.J. Lu <hjl.tools@gmail.com>2010-03-21 23:26:33 +0000
commitca4a656ba45ab05e7998d6fd5dc445f55d4c8197 (patch)
tree849f08709795d5a4b4401697b283e2322137c015
parentacaf5de82703513e8a2adddf5b2b7462f7be5fbf (diff)
downloadgdb-ca4a656ba45ab05e7998d6fd5dc445f55d4c8197.zip
gdb-ca4a656ba45ab05e7998d6fd5dc445f55d4c8197.tar.gz
gdb-ca4a656ba45ab05e7998d6fd5dc445f55d4c8197.tar.bz2
Check !executable instead of shared for PIE.
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.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elflink.c4
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 1558883..e48165e 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2010-03-19 Jie Zhang <jie@codesourcery.com>
* elf32-arm.c (struct section_list): Remove.
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;
}