From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8B7E0158064 for ; Sat, 4 May 2024 01:32:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF63EE2A75; Sat, 4 May 2024 01:32:54 +0000 (UTC) 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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ACA7FE2A75 for ; Sat, 4 May 2024 01:32:54 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BDDAA340CC9 for ; Sat, 4 May 2024 01:32:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5BCBD1979 for ; Sat, 4 May 2024 01:32:52 +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: <1714786367.51f6ad158fc3de14df3f87d1242ff950b2189f05.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/estrip X-VCS-Directories: bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 51f6ad158fc3de14df3f87d1242ff950b2189f05 X-VCS-Branch: master Date: Sat, 4 May 2024 01:32:52 +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: 19a2468f-4f15-4a21-bebd-72f48d08b08c X-Archives-Hash: c4fd43866f6b3cd4ec3e2f7976f65e20 commit: 51f6ad158fc3de14df3f87d1242ff950b2189f05 Author: Alex Xu (Hello71) yahoo ca> AuthorDate: Sat Mar 11 17:27:23 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sat May 4 01:32:47 2024 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=51f6ad15 estrip: Don't use splitdebug for .o files As the process_ar comment explained, object files cannot be splitdebug. Bug: https://bugs.gentoo.org/787623 ("www-client/firefox[clang]: .gnu_debuglink is busted when using LLD") Fixes: 51579fb34c19 ("prepstrip: add support for elfutils strip") Signed-off-by: Alex Xu (Hello71) yahoo.ca> Signed-off-by: Sam James gentoo.org> bin/estrip | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/estrip b/bin/estrip index 2d9d50922a..640645be63 100755 --- a/bin/estrip +++ b/bin/estrip @@ -280,9 +280,6 @@ dedup_elf_debug() { # Usage: save_elf_debug [splitdebug] save_elf_debug() { - ${FEATURES_splitdebug} || return 0 - ${PORTAGE_RESTRICT_splitdebug} && return 0 - debug-print-function "${FUNCNAME}" "$@" # NOTE: Debug files must be installed in @@ -390,7 +387,7 @@ process_elf() { if ${strip_this} ; then # See if we can split & strip at the same time - if [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then + if ${splitdebug} && [[ -n ${SPLIT_STRIP_FLAGS} ]] ; then local shortname="${x##*/}.debug" local splitdebug="${tmpdir}/splitdebug/${shortname}.${BASHPID:-$(__bashpid)}" @@ -401,7 +398,9 @@ process_elf() { "${x}" save_elf_debug "${x}" "${inode_link}_debug" "${splitdebug}" else - save_elf_debug "${x}" "${inode_link}_debug" + if ${splitdebug} ; then + save_elf_debug "${x}" "${inode_link}_debug" + fi ${already_stripped} || ${STRIP} ${strip_flags} "${x}" fi fi @@ -431,7 +430,7 @@ process_ar() { # There is no concept of splitdebug for objects not yet # linked in (only for finally linked ELFs), so we have to # retain the debug info in the archive itself. - if ! ${FEATURES_splitdebug} || ${PORTAGE_RESTRICT_splitdebug} ; then + if ! ${splitdebug} ; then ${STRIP} -g "${x}" && ${RANLIB} "${x}" fi fi @@ -542,6 +541,12 @@ do set +o noglob fi + if ${FEATURES_splitdebug} && ! ${PORTAGE_RESTRICT_splitdebug} ; then + splitdebug=true + else + splitdebug=false + fi + # In Prefix we are usually an unprivileged user, so we can't strip # unwritable objects. Make them temporarily writable for the # stripping. @@ -564,6 +569,7 @@ do ${f} == *"SB shared object"* ]] ; then process_elf "${x}" "${inode_link}" ${PORTAGE_STRIP_FLAGS} elif [[ ${f} == *"SB relocatable"* ]] ; then + [[ ${x} == *.ko ]] || splitdebug=false process_elf "${x}" "${inode_link}" ${SAFE_STRIP_FLAGS} fi