Blame SOURCES/gdb-rhbz1420304-s390x-35of35.patch

e1d87d
commit 1ef692ea23714876cc30b1a3ab3ef33a1369f17a
e1d87d
Author: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
e1d87d
Date:   Tue Aug 1 15:13:40 2017 +0200
e1d87d
e1d87d
    S/390: Fix claimfile failures
e1d87d
    
e1d87d
    This fixes a segfault when trying to access the local_plt field in the
e1d87d
    s390 specific elf data althoug the underlaying object is a generic elf
e1d87d
    object.
e1d87d
    
e1d87d
    This fixes the following testsuite failures:
e1d87d
    
e1d87d
    < FAIL: plugin claimfile replace symbol with source
e1d87d
    < FAIL: plugin claimfile resolve symbol with source
e1d87d
    < FAIL: plugin claimfile replace file with source
e1d87d
    < FAIL: plugin set symbol visibility with source
e1d87d
    < FAIL: plugin ignore lib with source
e1d87d
    < FAIL: plugin claimfile replace lib with source
e1d87d
    < FAIL: plugin 2 with source lib
e1d87d
    < FAIL: load plugin 2 with source
e1d87d
    < FAIL: plugin 3 with source lib
e1d87d
    < FAIL: load plugin 3 with source
e1d87d
    
e1d87d
    bfd/ChangeLog:
e1d87d
    
e1d87d
    2017-08-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
e1d87d
    
e1d87d
            * elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
e1d87d
            isn't the S/390 specific elf data.
e1d87d
            * elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
e1d87d
e1d87d
### a/bfd/ChangeLog
e1d87d
### b/bfd/ChangeLog
e1d87d
## -1,3 +1,9 @@
e1d87d
+2017-08-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
e1d87d
+
e1d87d
+	* elf32-s390.c (elf_s390_finish_dynamic_sections): Skip if it
e1d87d
+	isn't the S/390 specific elf data.
e1d87d
+	* elf64-s390.c (elf_s390_finish_dynamic_sections): Likewise.
e1d87d
+
e1d87d
 2017-07-31  Kuan-Lin Chen  <rufus@andestech.com>
e1d87d
 
e1d87d
 	* elfxx-riscv.c (riscv_elf_add_sub_reloc): New function.
e1d87d
--- a/bfd/elf32-s390.c
e1d87d
+++ b/bfd/elf32-s390.c
e1d87d
@@ -4001,6 +4001,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
e1d87d
 
e1d87d
       symtab_hdr = &elf_symtab_hdr (ibfd);
e1d87d
 
e1d87d
+      if (!is_s390_elf (ibfd))
e1d87d
+	continue;
e1d87d
+
e1d87d
       local_plt = elf_s390_local_plt (ibfd);
e1d87d
       if (local_plt != NULL)
e1d87d
 	for (i = 0; i < symtab_hdr->sh_info; i++)
e1d87d
--- a/bfd/elf64-s390.c
e1d87d
+++ b/bfd/elf64-s390.c
e1d87d
@@ -3814,6 +3814,9 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd,
e1d87d
 
e1d87d
       symtab_hdr = &elf_symtab_hdr (ibfd);
e1d87d
 
e1d87d
+      if (!is_s390_elf (ibfd))
e1d87d
+	continue;
e1d87d
+
e1d87d
       local_plt = elf_s390_local_plt (ibfd);
e1d87d
       if (local_plt != NULL)
e1d87d
 	for (i = 0; i < symtab_hdr->sh_info; i++)