Generate PLT relocs for weak undefined PPC function symbols.

Resolves: #1960730
This commit is contained in:
Nick Clifton 2021-05-18 12:50:19 +01:00
parent 616b9e8e44
commit fc998ec612
2 changed files with 47 additions and 1 deletions

View File

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

View File

@ -39,7 +39,7 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?name_cross}%{?_with_debug:-debug}
Version: 2.36.1
Release: 10%{?dist}
Release: 12%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -277,6 +277,10 @@ Patch20: binutils-CVE-2021-20197.patch
# Lifetime: Fixed in 2.37
Patch21: binutils-CVE-2021-3530.patch
# Purpose: Generate PLT relocs for weak undefined PowerPC function symbols.
# Lifetime: Fixed in 2.37
Patch22: binutils-ppc-weak-undefined-plt-relocs.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -858,6 +862,12 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Tue May 18 2021 Nick Clifton <nickc@redhat.com> - 2.36.1-12
- Generate PLT relocs for weak undefined PPC function symbols. (#1960730)
* Fri May 14 2021 Nick Clifton <nickc@redhat.com> - 2.36.1-11
- Enable file descriptor increase for plugin use.
* Thu May 13 2021 Nick Clifton <nickc@redhat.com> - 2.36.1-10
- Enable use of new dtags.