This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Set .plt entry size to 0 in elf32-hppa.c
- From: John David Anglin <danglin at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 12 Sep 2015 17:02:25 -0000
- Subject: [binutils-gdb] Set .plt entry size to 0 in elf32-hppa.c
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f3c3938c1c1a57f78e1be9d2dbb9ea0cda12edf6
commit f3c3938c1c1a57f78e1be9d2dbb9ea0cda12edf6
Author: John David Anglin <danglin@gcc.gnu.org>
Date: Sat Sep 12 12:50:55 2015 -0400
Set .plt entry size to 0 in elf32-hppa.c
Diff:
---
bfd/ChangeLog | 6 ++++++
bfd/elf32-hppa.c | 7 ++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c50979b..14c68bc 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-09-12 Helge Deller <deller@gmx.de>
+
+ PR ld/18514
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Set .plt entry
+ size to 0.
+
2015-09-09 Jiong Wang <jiong.wang@arm.com>
* elfnn-aarch64.c (IS_AARCH64_TLS_RELAX_RELOC): Sort alphabetically.
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 8b56ac4..8f0f4d0 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -4585,9 +4585,10 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd,
if (htab->splt != NULL && htab->splt->size != 0)
{
- /* Set plt entry size. */
- elf_section_data (htab->splt->output_section)
- ->this_hdr.sh_entsize = PLT_ENTRY_SIZE;
+ /* Set plt entry size to 0 instead of PLT_ENTRY_SIZE, since we add the
+ plt stubs and as such the section does not hold a table of fixed-size
+ entries. */
+ elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize = 0;
if (htab->need_plt_stub)
{