Blame SOURCES/binutils-ppc-weak-undefined-plt-relocs.patch

e0bdd4
Only in binutils-2.36.1/bfd: ChangeLog.orig
e0bdd4
Only in binutils-2.36.1/bfd: ChangeLog.rej
e0bdd4
diff -rup binutils.orig/bfd/elf32-ppc.c binutils-2.36.1/bfd/elf32-ppc.c
e0bdd4
--- binutils.orig/bfd/elf32-ppc.c	2021-05-18 11:38:27.644364623 +0100
e0bdd4
+++ binutils-2.36.1/bfd/elf32-ppc.c	2021-05-18 11:44:19.809184838 +0100
e0bdd4
@@ -5289,7 +5289,12 @@ allocate_dynrelocs (struct elf_link_hash
e0bdd4
       for (ent = h->plt.plist; ent != NULL; ent = ent->next)
e0bdd4
 	if (ent->plt.refcount > 0)
e0bdd4
 	  {
e0bdd4
-	    asection *s = htab->elf.splt;
e0bdd4
+	    asection *s;
e0bdd4
+
e0bdd4
+	    if (!ensure_undef_dynamic (info, h))
e0bdd4
+	      return FALSE;
e0bdd4
+
e0bdd4
+	    s = htab->elf.splt;
e0bdd4
 
e0bdd4
 	    if (!dyn)
e0bdd4
 	      {
e0bdd4
Only in binutils-2.36.1/bfd: elf32-ppc.c.orig
e0bdd4
Only in binutils-2.36.1/bfd: elf32-ppc.c.rej
e0bdd4
diff -rup binutils.orig/bfd/elf64-ppc.c binutils-2.36.1/bfd/elf64-ppc.c
e0bdd4
--- binutils.orig/bfd/elf64-ppc.c	2021-05-18 11:38:27.646364616 +0100
e0bdd4
+++ binutils-2.36.1/bfd/elf64-ppc.c	2021-05-18 11:41:01.635847814 +0100
e0bdd4
@@ -9819,6 +9819,9 @@ allocate_dynrelocs (struct elf_link_hash
e0bdd4
       for (pent = h->plt.plist; pent != NULL; pent = pent->next)
e0bdd4
 	if (pent->plt.refcount > 0)
e0bdd4
 	  {
e0bdd4
+	    if (!ensure_undef_dynamic (info, h))
e0bdd4
+	      return FALSE;
e0bdd4
+
e0bdd4
 	    if (!htab->elf.dynamic_sections_created
e0bdd4
 		|| h->dynindx == -1)
e0bdd4
 	      {
e0bdd4
Only in binutils-2.36.1/bfd: elf64-ppc.c.orig
e0bdd4
Only in binutils-2.36.1/bfd: elf64-ppc.c.rej