diff --git a/binutils-indirect-symbols.patch b/binutils-indirect-symbols.patch new file mode 100644 index 0000000..1c1982b --- /dev/null +++ b/binutils-indirect-symbols.patch @@ -0,0 +1,14 @@ +--- binutils.orig/bfd/elflink.c 2022-03-30 11:44:05.686040593 +0100 ++++ binutils-2.38/bfd/elflink.c 2022-03-30 11:45:18.066541463 +0100 +@@ -1294,9 +1294,8 @@ _bfd_elf_merge_symbol (bfd *abfd, + h->root.non_ir_ref_dynamic = true; + hi->root.non_ir_ref_dynamic = true; + } +- +- if ((oldbfd->flags & BFD_PLUGIN) != 0 +- && hi->root.type == bfd_link_hash_indirect) ++ else if ((oldbfd->flags & BFD_PLUGIN) != 0 ++ && hi->root.type == bfd_link_hash_indirect) + { + /* Change indirect symbol from IR to undefined. */ + hi->root.type = bfd_link_hash_undefined; diff --git a/binutils.spec b/binutils.spec index d61c1c0..e62fec1 100644 --- a/binutils.spec +++ b/binutils.spec @@ -39,7 +39,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.38 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -297,6 +297,10 @@ Patch21: binutils-gas-loc-view.patch # Lifetime: Fixed in 2.39 Patch22: binutils-do-not-use-debuginfod.patch +# Purpose: Keep indirect symbol from IR if referenced from shared object. +# Lifetime: Fixed in 2.39 +Patch23: binutils-indirect-symbols.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -910,6 +914,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Wed Mar 30 2022 Nick Clifton - 2.38-7 +- Fix a bug handling indirect symbols. (PR 28879) (#2068343) + * Thu Mar 10 2022 Nick Clifton - 2.38-6 - Simplify the assembler's evaluation of chained .loc view expressions. [Second attempt] (#2059646)