Correct the generation of relocations for PowerPC local ifuncs.

This commit is contained in:
Nick Clifton 2019-02-20 12:11:15 +00:00
parent 39087c2367
commit c34a46ed86
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,12 @@
--- binutils.orig/bfd/elf64-ppc.c 2019-02-20 10:58:09.700552616 +0000
+++ binutils-2.31.1/bfd/elf64-ppc.c 2019-02-20 10:59:15.989062349 +0000
@@ -13530,7 +13530,8 @@ write_plt_relocs_for_local_syms (struct
}
val = sym->st_value + ent->addend;
- val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
+ if (ELF_ST_TYPE (sym->st_info) != STT_GNU_IFUNC)
+ val += PPC64_LOCAL_ENTRY_OFFSET (sym->st_other);
if (sym_sec != NULL && sym_sec->output_section != NULL)
val += sym_sec->output_offset + sym_sec->output_section->vma;

View File

@ -69,7 +69,7 @@
Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.31.1
Release: 18%{?dist}
Release: 19%{?dist}
License: GPLv3+
URL: https://sourceware.org/binutils
@ -203,6 +203,10 @@ Patch20: binutils-gas-input-matches-output.patch
# Lifetime: Fixed in 2.32
Patch21: binutils-alignment-of-decompressed-sections.patch
# Purpose: Correct the generation of relocations for local ifuncs on PowerPC64
# Lifetime: Fixed in 2.32
Patch22: binutils-ppc64-local-ifunc-relocs.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -347,6 +351,7 @@ using libelf instead of BFD.
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -754,6 +759,9 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Wed Feb 20 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-29
- Correct the generation of relocations for PowerPC local ifuncs. (PR 23937)
* Mon Feb 18 2019 Nick Clifton <nickc@redhat.com> - 2.31.1-18
- Ensure that decompressed sections have the correct alignment. (#1678204)