diff --git a/binutils-ppc64-local-ifunc-relocs.patch b/binutils-ppc64-local-ifunc-relocs.patch new file mode 100644 index 0000000..b5637be --- /dev/null +++ b/binutils-ppc64-local-ifunc-relocs.patch @@ -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; + diff --git a/binutils.spec b/binutils.spec index 060d728..22c56e1 100644 --- a/binutils.spec +++ b/binutils.spec @@ -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 - 2.31.1-29 +- Correct the generation of relocations for PowerPC local ifuncs. (PR 23937) + * Mon Feb 18 2019 Nick Clifton - 2.31.1-18 - Ensure that decompressed sections have the correct alignment. (#1678204)