From 09c1fb65b9ca2bb699053c481332ebd971f8f391 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 14 Jun 2022 13:18:29 +0100 Subject: [PATCH] Fix bogus linker warnings about references to undefined symbols. Resolves: #2095926 --- binutils-undefined-ref-to-sym.patch | 15 +++++++++++++++ binutils.spec | 9 ++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 binutils-undefined-ref-to-sym.patch diff --git a/binutils-undefined-ref-to-sym.patch b/binutils-undefined-ref-to-sym.patch new file mode 100644 index 0000000..d0dc9a8 --- /dev/null +++ b/binutils-undefined-ref-to-sym.patch @@ -0,0 +1,15 @@ +--- binutils.orig/bfd/elflink.c 2022-06-13 14:22:15.071831986 +0100 ++++ binutils-2.35.2/bfd/elflink.c 2022-06-13 14:26:37.386163819 +0100 +@@ -5226,10 +5226,12 @@ elf_link_add_object_symbols (bfd *abfd, + if (!add_needed + && matched + && definition ++ && h->root.type != bfd_link_hash_indirect + && ((dynsym + && h->ref_regular_nonweak) + || (old_bfd != NULL + && (old_bfd->flags & BFD_PLUGIN) != 0 ++ && !info->lto_all_symbols_read + && bind != STB_WEAK) + || (h->ref_dynamic_nonweak + && (elf_dyn_lib_class (abfd) & DYN_AS_NEEDED) != 0 diff --git a/binutils.spec b/binutils.spec index cce6eb0..dc4cdcd 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.35.2 -Release: 23%{?dist} +Release: 24%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -424,6 +424,10 @@ Patch55: binutils-s390-z16.patch # Lifetime: Fixed in 2.37 Patch56: binutils-s390x-static-PIE.patch +# Purpose: Fix bogis linker warnings about references to undefined symbols. +# Lifetime: Fixed in 2.36 +Patch57: binutils-undefined-ref-to-sym.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -1017,6 +1021,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Jun 13 2022 Nick Clifton - 2.35.2-24 +- Fix bogus linker warnings about references to undefined symbols. (#2095926) + * Mon May 23 2022 Nick Clifton - 2.35.2-23 - GAS: AArch64: Do not complain about unknown disabled architecture extensions. (#2071038)