This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] PR ld/19091: sh: FDPIC linker fails to produce DT_PLTGOT for some files
- From: Rich Felker <dalias at libc dot org>
- To: binutils at sourceware dot org
- Date: Wed, 14 Oct 2015 15:48:14 -0400
- Subject: [PATCH] PR ld/19091: sh: FDPIC linker fails to produce DT_PLTGOT for some files
- Authentication-results: sourceware.org; auth=none
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.
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;