This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] S/390: Fix segfault with local ifunc symbols


Hi,

I've committed the attached patch to the S/390 BFD part in order to
fix a segfault with local ifunc symbols.

Bye,

-Andreas-

2012-11-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>

	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.

---
 bfd/elf32-s390.c |    3 +++
 bfd/elf64-s390.c |    3 +++
 2 files changed, 6 insertions(+)

Index: binutils/bfd/elf64-s390.c
===================================================================
--- binutils.orig/bfd/elf64-s390.c
+++ binutils/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;
 
Index: binutils/bfd/elf32-s390.c
===================================================================
--- binutils.orig/bfd/elf32-s390.c
+++ binutils/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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]