From 766f25c53f17a868aad2c533ac844d36023481d9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 10 Jan 2023 16:32:18 +0000 Subject: [PATCH] Extend fix handling symbol versioning with LTO plugins. Resolves: #2148469 --- binutils-ld-ir-plugin.patch | 12 ++++++++++++ binutils.spec | 13 ++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/binutils-ld-ir-plugin.patch b/binutils-ld-ir-plugin.patch index 79d840f..380f51e 100644 --- a/binutils-ld-ir-plugin.patch +++ b/binutils-ld-ir-plugin.patch @@ -45,3 +45,15 @@ diff -rup binutils.orig/bfd/linker.c binutils-2.35.2/bfd/linker.c break; /* Fall through. */ case MDEF: +--- binutils.orig/bfd/elflink.c 2023-01-10 15:47:50.062668055 +0000 ++++ binutils-2.35.2/bfd/elflink.c 2023-01-10 15:47:59.554659559 +0000 +@@ -1271,8 +1271,7 @@ _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 ++ else if ((oldbfd->flags & BFD_PLUGIN) != 0 + && hi->root.type == bfd_link_hash_indirect) + { + /* Change indirect symbol from IR to undefined. */ diff --git a/binutils.spec b/binutils.spec index 7defdcf..8177640 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.35.2 -Release: 33%{?dist} +Release: 35%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -1206,9 +1206,11 @@ exit 0 %if %{enable_shared} %{_libdir}/lib*.so* +%{_libdir}/lib*.la %exclude %{_libdir}/libbfd.so %exclude %{_libdir}/libopcodes.so -%exclude %{_libdir}/libctf*.*a +%exclude %{_libdir}/libbfd.la +%exclude %{_libdir}/libopcodes.la %endif %if %{with gold} @@ -1218,9 +1220,11 @@ exit 0 %files devel %{_prefix}/include/* -%{_libdir}/lib*.*a +%{_libdir}/lib*.a %{_libdir}/libbfd.so %{_libdir}/libopcodes.so +%{_libdir}/libbfd.la +%{_libdir}/libopcodes.la %if %{with crossbuilds} @@ -1252,6 +1256,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue Jan 10 2023 Nick Clifton - 2.35.2-35 +- Extend fix handling symbol versioning with LTO plugins. (#2148469) + * Mon Dec 19 2022 Nick Clifton - 2.35.2-33 - Restore libiberty.a to the binutils-devel package. (#2154772)