From: H.J. Lu Date: Sun, 21 Mar 2010 23:26:33 +0000 (+0000) Subject: Check !executable instead of shared for PIE. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ca4a656ba45ab05e7998d6fd5dc445f55d4c8197;p=binutils-gdb.git 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. --- 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; }