From patchwork Mon Feb 24 11:20:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 13987874 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 862FAC021A4 for ; Mon, 24 Feb 2025 11:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lvL+WJsEKg3dFuyt7ik4EJ8kAHgJHvbeKkMKnXL5ln0=; b=y0GiIVqWpbiflX m8aJFtWbBrCo2HPLnbpP9dv+tgl4/LVyqFFsg5UjcKOirI4/dBxdV1delCei7reYvlmyVQHjNCnM3 BMpGsc1GJx/xPJ50gYBhoxpzQk0bUo9uQ36REXlrG0c2k/Es3MWtF530tj6Kdk7yJhLVbRxCTN8AF S9D3g55dPnhWxp8QvT6nQwNLv/hnKLk4Ivg0MeRxI6SNIQa6XzAzp4i8nixe6kJ5TOzGuiwmaZnCP NnEcJ5Nqh1M1zYyG/UlEJpL29M/5/sbG8pW/U9xu82apHXq/BsepX8iWA+tKiK6u+5l/ATSJofBSn g6XW1UyC7pIXPb7O9FNg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tmWjf-0000000DQaQ-3xJD; Mon, 24 Feb 2025 11:34:55 +0000 Received: from xry111.site ([89.208.246.23]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tmWWE-0000000DKfo-2f46 for linux-riscv@lists.infradead.org; Mon, 24 Feb 2025 11:21:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site; s=default; t=1740396062; bh=9N5UbYwwS3cj4ISBSwf0j1nK6obW0UxDyUzHGsn7IM0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1xeJqD1EyhCPVOKwyq6EZS92UTpksyChGpHsp0/kMrNZ/qiBm9uYbSBNgFkV18W8 I4Mn+BG1Nnbb0PDA+3SQryW3Q6ibwr1eEF4B4ZMDldpQleHkN7ADemC/803GF2n3e3 yozfHj9ZvBFx81aO8ITspHS7YqkUn4w7PXg5zVe0= Received: from stargazer.. (unknown [IPv6:240e:358:1110:6100:dc73:854d:832e:7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id D8D9F1A40F0; Mon, 24 Feb 2025 06:20:55 -0500 (EST) From: Xi Ruoyao To: Guo Ren , Huacai Chen , WANG Xuerui , Palmer Dabbelt , Fangrui Song Cc: Tiezhu Yang , linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Xi Ruoyao Subject: [PATCH 1/3] riscv: vDSO: Remove --hash-style=both Date: Mon, 24 Feb 2025 19:20:40 +0800 Message-ID: <20250224112042.60282-2-xry111@xry111.site> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250224112042.60282-1-xry111@xry111.site> References: <20250224112042.60282-1-xry111@xry111.site> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250224_032102_738231_75CBBC45 X-CRM114-Status: UNSURE ( 7.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org When RISC-V borned, DT_GNU_HASH had already became the de-facto standard so DT_HASH is just wasting storage space. Remove the explicit --hash-style=both setting and rely on the distro toolchain default, which is most likely "gnu" (i.e. generating only DT_GNU_HASH, no DT_HASH). Following the logic of commit 48f6430505c0 ("arm64/vdso: Remove --hash-style=sysv"). Signed-off-by: Xi Ruoyao --- arch/riscv/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile index 9a1b555e8733..ecee348af9ce 100644 --- a/arch/riscv/kernel/vdso/Makefile +++ b/arch/riscv/kernel/vdso/Makefile @@ -47,7 +47,7 @@ $(obj)/vdso.o: $(obj)/vdso.so $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE $(call if_changed,vdsold_and_check) LDFLAGS_vdso.so.dbg = -shared -soname=linux-vdso.so.1 \ - --build-id=sha1 --hash-style=both --eh-frame-hdr + --build-id=sha1 --eh-frame-hdr # strip rule for the .so file $(obj)/%.so: OBJCOPYFLAGS := -S From patchwork Mon Feb 24 11:20:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 13987875 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id ABE55C021A4 for ; Mon, 24 Feb 2025 11:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4LdfGMkgd7cw8Rc4zpdaV+3qU7cX5AKBCJTS9o7B/ts=; b=MLgiWSkpevWoCi HMFPVES+62z40W/LoOxSGeVBsVlFg+4niCoKuhIuDAlrIgrdkyKkn/SVBw/lYzlZbpjbsmxUPOglk /h4Qoj3eoZ8XAyLhWoLfC4nZ0HBobZjytPHGnNs+uCM+JbnKUsgAhIhMKJcFg11oQuUSDVVl0JPN2 EqwBvlasGSyOdM4SVVnQaldaAeiqoY+y1Trau9viJykrj2Zp/UxoBKFM01fg4MzAjw+RWIRekqt48 N+iZeB19pXtro/f6CBRq4Ml5AiABtfqFDWXhWlBn3PaZZuWow5LjOHTgRMgoMfG3BW8a7kGs24v7x GKzp41sTjNwZNQkUAVyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tmWjk-0000000DQe5-3THv; Mon, 24 Feb 2025 11:35:00 +0000 Received: from xry111.site ([89.208.246.23]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tmWWK-0000000DKik-2qRG for linux-riscv@lists.infradead.org; Mon, 24 Feb 2025 11:21:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site; s=default; t=1740396068; bh=uK0G5z1dgyQ1LGyKW373cRDB/WnmXJQCfB7OmH+z2fk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gd4ZDedFN9+OzY9eGivWQTBRtB7LyVCXYFYIj2XuMmq5EdMAULRbgKhFeJFaBID9b oBanxXh8CBUeMzpAT+AlLNpFn99zk9GzOtaO1H3bLQzGhHyjeIp6fO1lnxKukVme2s b2beNCO8IiKLuLat0jC72Osz8qutKDtvGYaT6eWA= Received: from stargazer.. (unknown [IPv6:240e:358:1110:6100:dc73:854d:832e:7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 131341A40F1; Mon, 24 Feb 2025 06:21:02 -0500 (EST) From: Xi Ruoyao To: Guo Ren , Huacai Chen , WANG Xuerui , Palmer Dabbelt , Fangrui Song Cc: Tiezhu Yang , linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Xi Ruoyao Subject: [PATCH 2/3] csky: vDSO: Remove --hash-style=both Date: Mon, 24 Feb 2025 19:20:41 +0800 Message-ID: <20250224112042.60282-3-xry111@xry111.site> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250224112042.60282-1-xry111@xry111.site> References: <20250224112042.60282-1-xry111@xry111.site> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250224_032108_722113_7BAD8365 X-CRM114-Status: UNSURE ( 7.80 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org When CSKY borned, DT_GNU_HASH had already became the de-facto standard so DT_HASH is just wasting storage space. Remove the explicit --hash-style=both setting and rely on the distro toolchain default, which is most likely "gnu" (i.e. generating only DT_GNU_HASH, no DT_HASH). Following the logic of commit 48f6430505c0 ("arm64/vdso: Remove --hash-style=sysv"). Signed-off-by: Xi Ruoyao --- arch/csky/kernel/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/csky/kernel/vdso/Makefile b/arch/csky/kernel/vdso/Makefile index 069ef0b17fe5..3e100e6cf72f 100644 --- a/arch/csky/kernel/vdso/Makefile +++ b/arch/csky/kernel/vdso/Makefile @@ -29,7 +29,7 @@ SYSCFLAGS_vdso.so.dbg = $(c_flags) $(obj)/vdso.so.dbg: $(obj)/vdso.lds $(obj-vdso) FORCE $(call if_changed,vdsold) SYSCFLAGS_vdso.so.dbg = -shared -s -Wl,-soname=linux-vdso.so.1 \ - -Wl,--build-id=sha1 -Wl,--hash-style=both + -Wl,--build-id=sha1 $(obj)/vdso-syms.S: $(obj)/vdso.so FORCE $(call if_changed,so2s) From patchwork Mon Feb 24 11:20:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 13988031 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5967DC021BF for ; Mon, 24 Feb 2025 13:14:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TzG3youu4JcvtqF5YolHv3I9eLKGRLunJ0vYUpIakRk=; b=zAXhJ5465uIIvX AAFOAXscaJauDCq+pt7NBrfcYKpi8K0mIflKmgdFgK13qyH4bBtl9bzPz0A//E+Mc2WIRJ0cblsfw ZWXcwVh9oS4TMxSBvArecJFLJjon5iHN3l3fBG2jCxUzB+dTLCkFgbwL+3SgQMmQVF3SsOZToKFAl ENAvSklvwbY8wSYXLNNU8hS9tces/Fpnr7oP4trrl5ZM2OBko7guDoEDxFyjVU3XzcYIerm3HntsR deebkGPd8Rk7Px4KoPt2oM/oPMzSFERNOVu8uqRaUoSzgYrh/DYm48sf3oH7u3fnSegLMWhQDUL6q K3/6ah8oyehaF+KlbW1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tmYHJ-0000000Dn1U-0bm6; Mon, 24 Feb 2025 13:13:45 +0000 Received: from xry111.site ([89.208.246.23]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tmWWQ-0000000DKmT-3amS for linux-riscv@lists.infradead.org; Mon, 24 Feb 2025 11:21:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site; s=default; t=1740396074; bh=x+JZ0bZh6o31FzL/bWs2L2enB0qu5OHjl9gf7Goj11o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k3VDnIYouVr0xuGpeuELmGYMzdWobg9FRDuC7C9Ezp9heZVLghfX8FkRtu2F7dDHT Kkkq7HbrnLxWRaK/eMZiQsJyjeG6FRUei2AEg/LnV7gQrdulTn+JnyRv/tFHXSOAk8 Dl81KF6d1PcEAr5VfpGYtWbDbzhEzWuGwV+nG0ho= Received: from stargazer.. (unknown [IPv6:240e:358:1110:6100:dc73:854d:832e:7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 44E931A40EF; Mon, 24 Feb 2025 06:21:08 -0500 (EST) From: Xi Ruoyao To: Guo Ren , Huacai Chen , WANG Xuerui , Palmer Dabbelt , Fangrui Song Cc: Tiezhu Yang , linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, Xi Ruoyao Subject: [PATCH 3/3] LoongArch: vDSO: Remove --hash-style=sysv Date: Mon, 24 Feb 2025 19:20:42 +0800 Message-ID: <20250224112042.60282-4-xry111@xry111.site> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250224112042.60282-1-xry111@xry111.site> References: <20250224112042.60282-1-xry111@xry111.site> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250224_032114_919255_8618FDF9 X-CRM114-Status: UNSURE ( 9.46 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org glibc added support for .gnu.hash in 2006 and .hash has been obsoleted far before the first LoongArch CPU was taped. Using --hash-style=sysv might imply unaddressed issues and confuse readers. Some architectures use an explicit --hash-style=both here, but DT_GNU_HASH has already been supported by Glibc and Musl and become the de-facto standard of the distros when the first LoongArch CPU was taped. So DT_HASH seems just wasting storage space for LoongArch. Just drop the option and rely on the linker default, which is likely "gnu" (Arch, Debian, Gentoo, LFS) on all LoongArch distros (confirmed on Arch, Debian, Gentoo, and LFS; AOSC now defaults to "both" but it seems just an oversight). Following the logic of commit 48f6430505c0 ("arm64/vdso: Remove --hash-style=sysv"). Link: https://github.com/AOSC-Dev/aosc-os-abbs/pull/9796 Signed-off-by: Xi Ruoyao --- arch/loongarch/vdso/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/loongarch/vdso/Makefile b/arch/loongarch/vdso/Makefile index fdde1bcd4e26..abaf87c58f9d 100644 --- a/arch/loongarch/vdso/Makefile +++ b/arch/loongarch/vdso/Makefile @@ -37,7 +37,7 @@ endif # VDSO linker flags. ldflags-y := -Bsymbolic --no-undefined -soname=linux-vdso.so.1 \ $(filter -E%,$(KBUILD_CFLAGS)) -nostdlib -shared \ - --hash-style=sysv --build-id -T + --build-id -T # # Shared build commands.