diff --git a/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch b/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch new file mode 100644 index 0000000..2cdb734 --- /dev/null +++ b/binutils-aarch64-gold-PLT-for-MOVW_ABS.patch @@ -0,0 +1,20 @@ +--- binutils.orig/gold/aarch64.cc 2019-05-21 11:24:07.642560743 +0100 ++++ binutils-2.32/gold/aarch64.cc 2019-05-21 11:25:02.425157682 +0100 +@@ -6496,6 +6496,17 @@ Target_aarch64::Scan:: + gold_error(_("%s: unsupported reloc %u in pos independent link."), + object->name().c_str(), r_type); + } ++ // Make a PLT entry if necessary. ++ if (gsym->needs_plt_entry()) ++ { ++ target->make_plt_entry(symtab, layout, gsym); ++ // Since this is not a PC-relative relocation, we may be ++ // taking the address of a function. In that case we need to ++ // set the entry in the dynamic symbol table to the address of ++ // the PLT entry. ++ if (gsym->is_from_dynobj() && !parameters->options().shared()) ++ gsym->set_needs_dynsym_value(); ++ } + break; + + case elfcpp::R_AARCH64_LD_PREL_LO19: // 273 diff --git a/binutils.spec b/binutils.spec index f05e01f..2e1c504 100644 --- a/binutils.spec +++ b/binutils.spec @@ -85,7 +85,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.32 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -206,6 +206,11 @@ Patch18: binutils-disassembling-efi-files.patch # Lifetime: Fixed in 2.33 Patch19: binutils-CVE-2019-9071.patch +# Purpose: Have the GOLD linker for AArch64 generate PLT entries for MOVW_ABS +# relocations if necessary. +# Lifetime: Fixed in 2.33 +Patch20: binutils-aarch64-gold-PLT-for-MOVW_ABS.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -351,6 +356,7 @@ Conflicts: gcc-c++ < 4.0.0 %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. # FIXME - this is no longer true. Maybe try reinstating autotool use ? @@ -747,6 +753,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue May 21 2019 Nick Clifton - 2.32-14 +- Import fix for PR 23870 in order to help building Go binaries. + * Mon Apr 29 2019 Nick Clifton - 2.32-13 - Do not include ld.gold in the base binutils package. (#1703714)