From ca4a656ba45ab05e7998d6fd5dc445f55d4c8197 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sun, 21 Mar 2010 23:26:33 +0000 Subject: [PATCH] Check !executable instead of shared for PIE. 2010-03-21 H.J. Lu PR ld/11413 * elflink.c (_bfd_elf_add_default_symbol): Check !executable instead of shared. --- bfd/ChangeLog | 6 ++++++ bfd/elflink.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 155888337de..e48165e4278 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2010-03-21 H.J. Lu + + PR ld/11413 + * elflink.c (_bfd_elf_add_default_symbol): Check !executable + instead of shared. + 2010-03-19 Jie Zhang * elf32-arm.c (struct section_list): Remove. diff --git a/bfd/elflink.c b/bfd/elflink.c index 8f6b5f44056..98ea7535796 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; } -- 2.30.2