This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_29-branch] S/390: Fix claimfile failures
- From: Andreas Krebbel <krebbel at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 1 Aug 2017 13:16:26 -0000
- Subject: [binutils-gdb/binutils-2_29-branch] S/390: Fix claimfile failures
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ff22155c1e315ce6058f179ec4c20ee1bd1d07bc
commit ff22155c1e315ce6058f179ec4c20ee1bd1d07bc
Author: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Date: Tue Aug 1 15:15:38 2017 +0200
S/390: Fix claimfile failures
This fixes a segfault when trying to access the local_plt field in the
s390 specific elf data althoug the underlaying object is a generic elf
object.
This fixes the following testsuite failures:
< FAIL: plugin claimfile replace symbol with source
< FAIL: plugin claimfile resolve symbol with source
< FAIL: plugin claimfile replace file with source
< FAIL: plugin set symbol visibility with source
< FAIL: plugin ignore lib with source
< FAIL: plugin claimfile replace lib with source
< FAIL: plugin 2 with source lib
< FAIL: load plugin 2 with source
< FAIL: plugin 3 with source lib
< FAIL: load plugin 3 with source
bfd/ChangeLog:
2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
isn't the S/390 specific elf data.
* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
Diff:
---
bfd/ChangeLog | 9 +++++++++
bfd/elf32-s390.c | 3 +++
bfd/elf64-s390.c | 3 +++
3 files changed, 15 insertions(+)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 103334d..048bf14 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,6 +1,15 @@
2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Backport from mainline
+ 2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
+ isn't the S/390 specific elf data.
+ * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
+
+2017-08-01 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ Backport from mainline
2017-07-28 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* elf32-s390.c (elf_s390_finish_dynamic_sections): Add NULL
diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c
index 8adf9e4..4aa3915 100644
--- a/bfd/elf32-s390.c
+++ b/bfd/elf32-s390.c
@@ -4001,6 +4001,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
symtab_hdr = &elf_symtab_hdr (ibfd);
+ if (!is_s390_elf (ibfd))
+ continue;
+
local_plt = elf_s390_local_plt (ibfd);
if (local_plt != NULL)
for (i = 0; i < symtab_hdr->sh_info; i++)
diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c
index 4dfa007..d25c72b 100644
--- a/bfd/elf64-s390.c
+++ b/bfd/elf64-s390.c
@@ -3814,6 +3814,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
symtab_hdr = &elf_symtab_hdr (ibfd);
+ if (!is_s390_elf (ibfd))
+ continue;
+
local_plt = elf_s390_local_plt (ibfd);
if (local_plt != NULL)
for (i = 0; i < symtab_hdr->sh_info; i++)