This is the mail archive of the binutils-cvs@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]

[binutils-gdb] bfd: [SH] Emit DT_PLTGOT for FDPIC output unconditionally


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b4b0e149fa667b3907382e3492b53759665fe979

commit b4b0e149fa667b3907382e3492b53759665fe979
Author: Rich Felker <dalias@libc.org>
Date:   Thu Oct 15 07:14:43 2015 +0900

    bfd: [SH] Emit DT_PLTGOT for FDPIC output unconditionally
    
    PR ld/19091
    * elf32-sh.c (sh_elf_size_dynamic_sections): Always emit DT_PLTGOT for FDPIC output.

Diff:
---
 bfd/ChangeLog  | 6 ++++++
 bfd/elf32-sh.c | 3 +--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6cd68de..5bd8d55 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-14  Rich Felker  <dalias@libc.org>
+
+	PR ld/19091
+	* elf32-sh.c (sh_elf_size_dynamic_sections): Always emit
+	DT_PLTGOT for FDPIC output.
+
 2015-10-13  Alan Modra  <amodra@gmail.com>
 
 	* elf.c (_bfd_elf_map_sections_to_segments): Don't set
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 9fa3636..eebf380 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3608,8 +3608,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
 	      || ! add_dynamic_entry (DT_JMPREL, 0))
 	    return FALSE;
 	}
-      else if ((elf_elfheader (output_bfd)->e_flags & EF_SH_FDPIC)
-	       && htab->sgot->size != 0)
+      else if ((elf_elfheader (output_bfd)->e_flags & EF_SH_FDPIC))
 	{
 	  if (! add_dynamic_entry (DT_PLTGOT, 0))
 	    return FALSE;


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