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

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