From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E8D541581EE for ; Thu, 10 Apr 2025 17:35:06 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id D2D33343573 for ; Thu, 10 Apr 2025 17:35:06 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id AC6521104B0; Thu, 10 Apr 2025 17:35:05 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id A17EA1104B0 for ; Thu, 10 Apr 2025 17:35:05 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 331E4343509 for ; Thu, 10 Apr 2025 17:35:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8884C159F for ; Thu, 10 Apr 2025 17:35:03 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1744306497.d942e7ae10ce3c8fd06e893c6ce01ccd1258e877.sam@gentoo> Subject: [gentoo-commits] proj/toolchain/binutils-patches:master commit in: 9999/ X-VCS-Repository: proj/toolchain/binutils-patches X-VCS-Files: 9999/0006-ld-Skip-the-LTO-archive-member-only-for-the-earlier-.patch X-VCS-Directories: 9999/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: d942e7ae10ce3c8fd06e893c6ce01ccd1258e877 X-VCS-Branch: master Date: Thu, 10 Apr 2025 17:35:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 9ced9164-1bb2-43b5-b3d8-ad1ea28bb317 X-Archives-Hash: 6a5a783636048444d8b25131f597a410 commit: d942e7ae10ce3c8fd06e893c6ce01ccd1258e877 Author: Sam James gentoo org> AuthorDate: Thu Apr 10 17:34:57 2025 +0000 Commit: Sam James gentoo org> CommitDate: Thu Apr 10 17:34:57 2025 +0000 URL: https://gitweb.gentoo.org/proj/toolchain/binutils-patches.git/commit/?id=d942e7ae 9999: drop merged LTO patch Signed-off-by: Sam James gentoo.org> ...-LTO-archive-member-only-for-the-earlier-.patch | 186 --------------------- 1 file changed, 186 deletions(-) diff --git a/9999/0006-ld-Skip-the-LTO-archive-member-only-for-the-earlier-.patch b/9999/0006-ld-Skip-the-LTO-archive-member-only-for-the-earlier-.patch deleted file mode 100644 index 1eb52fc..0000000 --- a/9999/0006-ld-Skip-the-LTO-archive-member-only-for-the-earlier-.patch +++ /dev/null @@ -1,186 +0,0 @@ -https://inbox.sourceware.org/binutils/20250408201002.383836-1-hjl.tools@gmail.com/ - -From b6ccbf6faecf5e2d43d776fab90f0a5d673a2817 Mon Sep 17 00:00:00 2001 -Message-ID: -From: "H.J. Lu" -Date: Tue, 8 Apr 2025 13:10:02 -0700 -Subject: [PATCH] ld: Skip the LTO archive member only for the earlier DSO - -commit 2707d55e539ef323dd14a1293e762bf3d9739ee7 -Author: Michael Matz -Date: Mon Mar 31 15:57:08 2025 +0200 - -skipped the LTO archive member even when the earlier item is also an -archive. Instead, skip the LTO archive member only if the earlier item -is a shared library. - -bfd/ - - PR ld/32846 - PR ld/32854 - * elflink.c (elf_link_add_archive_symbols): Skip the LTO archive - member only if the earlier item is a shared library. - -ld/ - - PR ld/32846 - PR ld/32854 - * testsuite/ld-plugin/lto.exp: Run ld/32846 test. - * testsuite/ld-plugin/pr32846a.c: New file. - * testsuite/ld-plugin/pr32846b.c: Likewise. - * testsuite/ld-plugin/pr32846c.c: Likewise. - * testsuite/ld-plugin/pr32846d.c: Likewise. - * testsuite/ld-plugin/pr32846e.c: Likewise. - -Signed-off-by: H.J. Lu ---- - bfd/elflink.c | 8 +++++--- - ld/testsuite/ld-plugin/lto.exp | 32 +++++++++++++++++++++++++++++++ - ld/testsuite/ld-plugin/pr32846a.c | 6 ++++++ - ld/testsuite/ld-plugin/pr32846b.c | 4 ++++ - ld/testsuite/ld-plugin/pr32846c.c | 6 ++++++ - ld/testsuite/ld-plugin/pr32846d.c | 12 ++++++++++++ - ld/testsuite/ld-plugin/pr32846e.c | 4 ++++ - 7 files changed, 69 insertions(+), 3 deletions(-) - create mode 100644 ld/testsuite/ld-plugin/pr32846a.c - create mode 100644 ld/testsuite/ld-plugin/pr32846b.c - create mode 100644 ld/testsuite/ld-plugin/pr32846c.c - create mode 100644 ld/testsuite/ld-plugin/pr32846d.c - create mode 100644 ld/testsuite/ld-plugin/pr32846e.c - -diff --git a/bfd/elflink.c b/bfd/elflink.c -index a76e8e38da7..2ac12144990 100644 ---- a/bfd/elflink.c -+++ b/bfd/elflink.c -@@ -6290,8 +6290,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - continue; - - /* In the pre-LTO-plugin pass we must not mistakenly -- include this archive member if an earlier BFD -- defined this symbol. */ -+ include this archive member if an earlier shared -+ library defined this symbol. */ - struct elf_link_hash_table *htab = elf_hash_table (info); - if (htab->first_hash) - { -@@ -6299,7 +6299,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) - = ((struct elf_link_first_hash_entry *) - bfd_hash_lookup (htab->first_hash, symdef->name, - false, false)); -- if (e && e->abfd != abfd) -+ if (e -+ && (e->abfd->flags & DYNAMIC) != 0 -+ && e->abfd != abfd) - continue; - } - } -diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp -index 93491902674..726dd933329 100644 ---- a/ld/testsuite/ld-plugin/lto.exp -+++ b/ld/testsuite/ld-plugin/lto.exp -@@ -1212,6 +1212,38 @@ if { [is_elf_format] } { - - if { [is_elf_format] && [check_lto_shared_available] } { - run_ld_link_exec_tests $lto_run_elf_shared_tests -+ if { [check_lto_fat_available] } { -+ run_cc_link_tests [list \ -+ [list \ -+ "Build libpr32846a.a" \ -+ "$plug_opt" "-O2 -flto $lto_no_fat" \ -+ {pr32846a.c pr32846b.c} {} "libpr32846a.a" \ -+ ] \ -+ [list \ -+ "Build libpr32846b.a" \ -+ "$plug_opt" "-O2 -flto $lto_no_fat" \ -+ {pr32846a.c pr32846b.c pr32846c.c} {} "libpr32846b.a" \ -+ ] \ -+ [list \ -+ "Build pr32846d.o" \ -+ "$plug_opt" "-O2 -flto $lto_no_fat" \ -+ {pr32846d.c} {} \ -+ ] \ -+ [list \ -+ "Build pr32846e.o" \ -+ "$plug_opt" "-O2 -flto $lto_no_fat" \ -+ {pr32846e.c} {} \ -+ ] \ -+ [list \ -+ "Build pr32846" \ -+ "-shared -fPIC -O2 -flto $lto_no_fat -Wl,--no-undefined \ -+ tmpdir/pr32846d.o tmpdir/libpr32846a.a \ -+ tmpdir/libpr32846b.a tmpdir/pr32846e.o" \ -+ "-O2 -fPIC -flto $lto_no_fat" \ -+ {dummy.c} {} "pr32846" \ -+ ] \ -+ ] \ -+ } - } - - proc pr20103 {cflags libs} { -diff --git a/ld/testsuite/ld-plugin/pr32846a.c b/ld/testsuite/ld-plugin/pr32846a.c -new file mode 100644 -index 00000000000..8c161711bd9 ---- /dev/null -+++ b/ld/testsuite/ld-plugin/pr32846a.c -@@ -0,0 +1,6 @@ -+extern void mkdir_p (void); -+void -+mkdir_parents (void) -+{ -+ mkdir_p (); -+} -diff --git a/ld/testsuite/ld-plugin/pr32846b.c b/ld/testsuite/ld-plugin/pr32846b.c -new file mode 100644 -index 00000000000..9776a372d7a ---- /dev/null -+++ b/ld/testsuite/ld-plugin/pr32846b.c -@@ -0,0 +1,4 @@ -+void -+hash_new (void) -+{ -+} -diff --git a/ld/testsuite/ld-plugin/pr32846c.c b/ld/testsuite/ld-plugin/pr32846c.c -new file mode 100644 -index 00000000000..f87cffb8865 ---- /dev/null -+++ b/ld/testsuite/ld-plugin/pr32846c.c -@@ -0,0 +1,6 @@ -+extern void hash_new (void); -+void -+kmod_new (void) -+{ -+ hash_new(); -+} -diff --git a/ld/testsuite/ld-plugin/pr32846d.c b/ld/testsuite/ld-plugin/pr32846d.c -new file mode 100644 -index 00000000000..c6f41021adf ---- /dev/null -+++ b/ld/testsuite/ld-plugin/pr32846d.c -@@ -0,0 +1,12 @@ -+extern void kmod_new (void); -+extern void mkdir_parents (void); -+void -+do_lsmod (void) -+{ -+ kmod_new (); -+} -+void -+do_static_nodes (void) -+{ -+ mkdir_parents(); -+} -diff --git a/ld/testsuite/ld-plugin/pr32846e.c b/ld/testsuite/ld-plugin/pr32846e.c -new file mode 100644 -index 00000000000..c4e5e56f4f6 ---- /dev/null -+++ b/ld/testsuite/ld-plugin/pr32846e.c -@@ -0,0 +1,4 @@ -+void -+mkdir_p (void) -+{ -+} - -base-commit: faaee6b411411f3c1f45768d7ac15559fd27b980 --- -2.49.0 -