Fix the GOLD linker's processing of protected symbols created by the LLVM plugin.

Resolves: #1559234
This commit is contained in:
Nick Clifton 2018-03-22 17:29:42 +00:00
parent c05cfd7b3e
commit 26acb12d22
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,16 @@
--- binutils.orig/gold/resolve.cc 2018-03-22 16:52:11.746513638 +0000
+++ binutils-2.30/gold/resolve.cc 2018-03-22 16:53:58.038192419 +0000
@@ -265,10 +265,13 @@ Symbol_table::resolve(Sized_symbol<size>
return;
// Likewise for an absolute symbol defined twice with the same value.
+ // Plugin-symbols are always absolute with same value here, so ignore those.
if (!is_ordinary
&& st_shndx == elfcpp::SHN_ABS
&& !to_is_ordinary
&& to_shndx == elfcpp::SHN_ABS
+ && object->pluginobj() == NULL
+ && to->object()->pluginobj() == NULL
&& to->value() == sym.get_st_value())
return;

View File

@ -62,7 +62,7 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug} Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.30 Version: 2.30
Release: 13%{?dist} Release: 14%{?dist}
License: GPLv3+ License: GPLv3+
Group: Development/Tools Group: Development/Tools
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -189,6 +189,11 @@ Patch17: binutils-ifunc-relocs-in-notes.patch
# Lifetime: Fixed in 2.31. # Lifetime: Fixed in 2.31.
Patch18: binutils-debug-section-marking.patch Patch18: binutils-debug-section-marking.patch
# Purpose: Fix the GOLD linker's handling of PROTECTED symbols from the
# LLVM plugin.
# Lifetime: Fixed in 2.31 (probably - check...).
Patch19: binutils-gold-llvm-plugin.patch
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
Provides: bundled(libiberty) Provides: bundled(libiberty)
@ -332,6 +337,7 @@ using libelf instead of BFD.
%patch16 -p1 %patch16 -p1
%patch17 -p1 %patch17 -p1
%patch18 -p1 %patch18 -p1
%patch19 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59. # We cannot run autotools as there is an exact requirement of autoconf-2.59.
@ -740,6 +746,9 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Thu Mar 22 2018 Nick Clifton <nickc@redhat.com> 2.30-14
- Fix the GOLD linker's processing of protected symbols created by the LLVM plugin. (#1559234 and PR 22868)
* Wed Mar 14 2018 Nick Clifton <nickc@redhat.com> 2.30-13 * Wed Mar 14 2018 Nick Clifton <nickc@redhat.com> 2.30-13
- Do not discard debugobj files created by GCC v8 LTO wrapper. (#1543912 and RHBZ 84847 and PR 20882) - Do not discard debugobj files created by GCC v8 LTO wrapper. (#1543912 and RHBZ 84847 and PR 20882)