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

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