From nobody Wed Nov 06 23:29:11 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 4XkLxz2537z5c0Qs; Wed, 06 Nov 2024 23:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XkLxz1Zmpz4LBy; Wed, 6 Nov 2024 23:29:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730935751; 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=OJB3wuRKsQvtf/gigU7/xmwGFTXna4myec5qAZeQsic=; b=VUqu3mz+9Gwxmdmc5QIklawaY0JtP3Blb2ULzgWPU72Hlv+kEBWy0ygQuHYWI3n/6xZhFs L4w/sd6ZPgknav1hgL/V4xLougnBGKSZpiyJyXFPzA3pwBKLDi8AochFIUbD/dJ9/QD6NU mQBM6/FPYtTLARjyMBeVYZmR3mum7m4nuo6JrfkHJsq9Eeet/grLszrKZwKZQLD9gI3diO PO8hORjDxuOw23FcfByvQXAfK8fbqLWmAEiMksyMA+DBUV1IpA8zHEVfsN1SsfW6tLLAtI zwa7TJTZSioxndC8gTWOPDMy4vI+X9UCUHHXwdSLYWe2Zkv+nhJdPUYyzJHKwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730935751; 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=OJB3wuRKsQvtf/gigU7/xmwGFTXna4myec5qAZeQsic=; b=EegN/5Ntu6rzV7gfS+W0WzGGO4WpIOf25P/rAWRUNvdBlJ6fbqJ764AQiXXrzK44ONLZxw TCjM4jS1RpvfA1UhMc2oR56b9LVmAiSQ8jVonQklap5DAcBoyxp0Eq4sU/yRvj9HoCeA+e qeHjfFOvkhKV1LVof6TcF/r2qiXosdFKTfLMMWwCOuow8qSY4LpJ6GrYA+qGVMvzmg7k5h 3DCo6682ijRvFgYiHHFBr7xoihFnGHJhBbeXZtxRhCXUsXm1At+nhEVyl/onWIE59CsvWm lCRHgZW04Xxs6WiasQoqjl8UT36XzaIiJRJAko6iDh6mzz64Ke30EU9gA8Go5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730935751; a=rsa-sha256; cv=none; b=ADVteo2Ej8lH7By0oQ8GZjrV8y3IUod98PwUZDiWBCOGkAE/RVVG1smKC1XtyvA4o0gdRk C9G77i0hoY7MXPU7sesulsR4RHuzGclOHDFRifAlz0lHZp81N6rUy7MNLh7sX3BWqJrwKt omzaq+k5OhnXc5Gu98LtR02VFJWTcetIFZ9OJQomEJv0nGzrNwnVwWzddddk8DQZV+RgjZ P/BkPxxnynLfKcv/fnd+zquaZb5HsGnsQ5+VJk2duY7wwYjfea11cLfrPssJ84OawToH6y iFeFEbreNQwRolzj3Y2u9w03c6RJXHlHn3JUZFwsPZUSfIlX0O4uSgGAZhSH1Q== 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 4XkLxz19trzLml; Wed, 6 Nov 2024 23:29: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 4A6NTBIU053785; Wed, 6 Nov 2024 23:29:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4A6NTBbr053782; Wed, 6 Nov 2024 23:29:11 GMT (envelope-from git) Date: Wed, 6 Nov 2024 23:29:11 GMT Message-Id: <202411062329.4A6NTBbr053782@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: d4cfad2d0391 - stable/13 - 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d4cfad2d0391d0bb306d24d1fbcb4ba72078b328 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d4cfad2d0391d0bb306d24d1fbcb4ba72078b328 commit d4cfad2d0391d0bb306d24d1fbcb4ba72078b328 Author: Konstantin Belousov AuthorDate: 2024-10-18 14:09:26 +0000 Commit: Dimitry Andric CommitDate: 2024-11-06 23:24:38 +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 e64c964219c3..09e08dc05dd2 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 1a0203e3e0a4..295b16c87c2d 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