From nobody Thu Oct 24 02:46:10 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XYqzl2PT8z5ZyDh; Thu, 24 Oct 2024 02:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XYqzl19tpz4749; Thu, 24 Oct 2024 02:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729737971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND0hVDKEpKiXQWswvVZDIv9KpMQVsuGcKuzaMRt+8z4=; b=X2NzCV00SCi/xe/2V2rPMPeQjZ7tLx7B5P4710REw1OQysZ1Qi424KEtfQQ4Ge27GZYve+ 00OsjtHNNEf03Yt0Q76yFdlpPYeiYshY5F/zu+vgFaROPF+g9p2tETpgbnknTkc5NGSDEf Sx3uLZyRpwF5C6CcvbpWZB7QKOdAzRDFQ7avGUET8yShKFHDCGBgNlQPi9ylUsY/yqyDZK DvH8vH1kJO7J3DgZivbvsF6iwns5XP/kDBCgKiZZ0Nni02dXs6aOov6iivRHtN5E0ytDwd rwV/HbeMooXp0SKbsm5QAVU3/Pm3jQ2dZntim/DV20TyxHnRFZSdiIp9F/OacA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729737971; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ND0hVDKEpKiXQWswvVZDIv9KpMQVsuGcKuzaMRt+8z4=; b=tH0p7ADaD0zuIYxlqmjN0ScbZO9B+RfSVUipyQlS4NOwvNfJsUUcHZ9/aGlZJA6kNXgCGp T4O7C04NvsNaf9ytQQ0AljnbwCYWSBmspGwhkF5jDc3D3Dvh3qY++m4S5ygnNYtftInB9M sd8LeYOSJ68n6zmhFPznrY6aCb9yOFrjwYdP46hUJgpEA1r1IwvwRTdJXS/6tmXeyPrkHm UuKscDY2uz0ESvAheqMQkY/UT1ZQeuG6KZ10b8B4T10FmcVj40zpz6pfw77uCTGCQ9CG7V zZXSQg1MHmCCvWV+IIXn64QzD3EnZ7LuGUXZ699gm8v71IEhi5q5gKIsX+9YzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729737971; a=rsa-sha256; cv=none; b=xtD5sj3iATWIRH926xoC6P1gV64x019OzemtW1neQyHCGFaW6eNAET7Q6EseJkMlSbaX6a +qtYs71l9rKeATPtQtFE7q1k8xZG2tkCGOwIYXDwF1RkzIfUgAYES4NYxYzb9HxNxRweNn YKU6C7fSlZ75FDG0eiqUuIej1x11nEFXzZbipH7HEZpDiQnKxUkM17pEhjYIOVUXm3R3Z1 70BM0UsDPE3iAq7O/m9VBeE1gkHcFlQtxLEWGDSJgewu4t07cGKhnCBqMkADOkBubsFC8y T0nX+Gt0q05OV1sRqZ388a0O0L9Fu2knqY0OHh2qTntDjgFyMCdDcSTRi++nFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XYqzl0DvDzPSY; Thu, 24 Oct 2024 02:46:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49O2kANF086296; Thu, 24 Oct 2024 02:46:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49O2kALm086293; Thu, 24 Oct 2024 02:46:10 GMT (envelope-from git) Date: Thu, 24 Oct 2024 02:46:10 GMT Message-Id: <202410240246.49O2kALm086293@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: be2940e90864 - stable/14 - amd64: do not pass -z rodynamic to ld.bfd when building vdso List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: be2940e908642c3019ba8196430c2cb09f1dc532 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=be2940e908642c3019ba8196430c2cb09f1dc532 commit be2940e908642c3019ba8196430c2cb09f1dc532 Author: Konstantin Belousov AuthorDate: 2024-10-18 14:09:26 +0000 Commit: Konstantin Belousov CommitDate: 2024-10-24 02:44:40 +0000 amd64: do not pass -z rodynamic to ld.bfd when building vdso (cherry picked from commit 3b2cf9381ef86847603c3c94811f638660c417ae) --- sys/tools/amd64_ia32_vdso.sh | 7 ++++++- sys/tools/amd64_vdso.sh | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/sys/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh index 59923749042f..85d2299b45d0 100644 --- a/sys/tools/amd64_ia32_vdso.sh +++ b/sys/tools/amd64_ia32_vdso.sh @@ -34,9 +34,14 @@ ${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c -m32 \ -o ia32_sigtramp.pico -I. -I"${S}" -include opt_global.h \ "${S}"/amd64/ia32/ia32_sigtramp.S +if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then + RODYNAMIC="-z rodynamic" +else + RODYNAMIC="" +fi ${LD} --shared -Bsymbolic -soname="elf-vdso32.so.1" \ -T "${S}"/conf/vdso_amd64_ia32.ldscript \ - --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \ + --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \ --hash-style=sysv --fatal-warnings --strip-all \ -o elf-vdso32.so.1 ia32_sigtramp.pico diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh index aec0694ebdb1..2a83ae874ab7 100644 --- a/sys/tools/amd64_vdso.sh +++ b/sys/tools/amd64_vdso.sh @@ -40,12 +40,17 @@ ${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ # # -z rodynamic is undocumented lld-specific option, seemingly required # for lld to avoid putting dynamic into dedicated writeable segment, -# despite ldscript placement. It is ignored by ld.bfd but ldscript +# despite ldscript placement. It is omitted for ld.bfd, but ldscript # alone is enough there. # +if ${LD} --version | ${AWK} '/^GNU ld/{exit 1}' ; then + RODYNAMIC="-z rodynamic" +else + RODYNAMIC="" +fi ${LD} --shared -Bsymbolic -soname="elf-vdso.so.1" \ -T "${S}"/conf/vdso_amd64.ldscript \ - --eh-frame-hdr --no-undefined -z rodynamic -z norelro -nmagic \ + --eh-frame-hdr --no-undefined ${RODYNAMIC} -z norelro -nmagic \ --hash-style=sysv --fatal-warnings --strip-all \ -o elf-vdso.so.1 sigtramp.pico