From 6668da1b3ac90991bde35b00126f860e59b9fae7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Nov 07 2012 14:08:22 +0000 Subject: - Fix segfault with local ifunc symbols on s390[x] (#805107). --- diff --git a/binutils-rh805107.patch b/binutils-rh805107.patch new file mode 100644 index 0000000..c6b5e81 --- /dev/null +++ b/binutils-rh805107.patch @@ -0,0 +1,39 @@ +commit b3c9c2482e3f22f4b5ac5968dff87d27cf2c572b +Author: Andreas Krebbel +Date: Mon Nov 5 12:31:07 2012 +0000 + + 2012-11-05 Andreas Krebbel + + PR target/14788 + * elf32-s390.c (elf_s390_relocate_section): Set elf.dynobj for + local ifunc symbols. + * elf64-s390.c (elf_s390_relocate_section): Likewise. + +diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c +index d6eedfa..7a9d89c 100644 +--- a/bfd/elf32-s390.c ++++ b/bfd/elf32-s390.c +@@ -1013,6 +1013,9 @@ elf_s390_check_relocs (bfd *abfd, + { + struct plt_entry *plt; + ++ if (htab->elf.dynobj == NULL) ++ htab->elf.dynobj = abfd; ++ + if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) + return FALSE; + +diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c +index 19926c6..2b6d9bf 100644 +--- a/bfd/elf64-s390.c ++++ b/bfd/elf64-s390.c +@@ -937,6 +937,9 @@ elf_s390_check_relocs (bfd *abfd, + { + struct plt_entry *plt; + ++ if (htab->elf.dynobj == NULL) ++ htab->elf.dynobj = abfd; ++ + if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) + return FALSE; + diff --git a/binutils.spec b/binutils.spec index 5621f08..cbaf767 100644 --- a/binutils.spec +++ b/binutils.spec @@ -17,7 +17,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.23.51.0.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3+ Group: Development/Tools URL: http://sources.redhat.com/binutils @@ -42,8 +42,9 @@ Patch09: binutils-2.22.52.0.1-export-demangle.h.patch Patch10: binutils-2.22.52.0.4-no-config-h-check.patch # Make GOLD honour the KEEP directive in linker scripts. Patch11: binutils-2.23.51.0.1-gold-keep.patch -# Bugfix for s390[x] IFUNC support +# Bugfixes for s390[x] IFUNC support Patch12: binutils-rh805974.patch +Patch13: binutils-rh805107.patch %define gold_arches %ix86 x86_64 @@ -149,6 +150,7 @@ using libelf instead of BFD. %patch10 -p0 -b .no-config-h-check~ %patch11 -p0 -b .gold-keep~ %patch12 -p1 +%patch13 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. @@ -447,6 +449,9 @@ exit 0 %endif # %{isnative} %changelog +* Wed Nov 7 2012 Jeff Law 2.23.51.0.1-5 +- Fix segfault with local ifunc symbols on s390[x] (#805107). + * Tue Sep 4 2012 Jeff Law 2.23.51.0.1-4 - Correctly handle PLTOFF relocs for s390 IFUNCs.