From nobody Thu Oct 13 04:46:08 2022 X-Original-To: dev-commits-src-branches@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 4Mnxmc4pk5z4dyDs; Thu, 13 Oct 2022 04:46:08 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mnxmc4JmQz3W6y; Thu, 13 Oct 2022 04:46:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665636368; 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=rCok4OwaOGmd6w563prIBBkiMHbvA0bgHbzxyhCQ5dE=; b=pufBmnxEaup4Y51jBI74RSN4BI2JsXpxavJw39WXW1cwWHX49wjagwYNd9C+It/kY85gyJ s2qnOq6FFyxDBE0OEbqApW2J2iAR+DPno2tnh5ToPWABaco4PfkQQVDeFm+rQbOjwRWS48 jAi2jmhyQVd3xP9WqCB1vPmAysaOxTB/HdpeFiHK6qiC7F2V+miBNNO+5TR9Wey3PnJV/Y DZzOVHcfeXS6qYTHsnw+ehMekkE/+Op1Lg/LUbWo9tjHDVqj1RVHv278n4h01QM7+tRdvC BdjbBf0ZM+kLyKczNI5FKFXB5U6jOX4WwRFZdqJvY9T2jRQym2oWt6H542DK/w== 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 4Mnxmc3NPCzJSL; Thu, 13 Oct 2022 04:46:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29D4k8Vn002642; Thu, 13 Oct 2022 04:46:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29D4k8Oc002641; Thu, 13 Oct 2022 04:46:08 GMT (envelope-from git) Date: Thu, 13 Oct 2022 04:46:08 GMT Message-Id: <202210130446.29D4k8Oc002641@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: a763331899b4 - stable/13 - ldd: use direct exec mode unconditionally List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: a763331899b4bb5502382ce1d5dfc8a35d857e27 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665636368; 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=rCok4OwaOGmd6w563prIBBkiMHbvA0bgHbzxyhCQ5dE=; b=rXXvYn2PRM18awP2U1UQMAG10yICJzw4LDwGmoDqCeypkjLrgTBpgSIi9en+wD/I2kwURK jSVAyJfrmq4RKXYrFLBpRYUlGZV/kbemiGwaP0J28qE2YwMyjgQQ/tyyWv1vUY/TbnTA3d ZXe5XHzH+pIYcST8mCa/lo/NTSBtU3PVTE1BgRokD/7x8oLrI+VKI2C0A1tisGnTG8B5rk BWLED7eSSe+px4CkMMMvy9KANSbC+g9TWy5ppbhf457ZJGX6nnfO8zlbetoTdIc/FxXoEm 6xErbLWXHR3NM72hmNCAbaGuV9hBRvb0ubrd2GC5QeCSFMBgxxE4kz+5Y1G5wg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665636368; a=rsa-sha256; cv=none; b=Mq5ER7P6l347Fe5tDFPZ5w639SLY/VwQQ+bfuowk6anH9ktYMQl0p3NMSt3Ld0Oo/zhyv5 7XrQdGB02LYXsDEnVIjl9dnde1hDuBmj/a/FMbu9v1Kbb6POvvV4kEVYP94AntLYy7TOuv dUZhq7KY4GXKBwyoHCSrpsjHX8coFZJkZZrPLEG/fsl0VrRwirsSi7PrU9MP62BLKkyki7 L1AU5Dz9nHz1Ha6BVn2mis5iYSaloeiAaS4iBp7iYw4zgZpYKCgk53uR3Rtpo8H2OdS0MT 1BtAQZ+0tkQDyXLXYBgAPxgTve9ro/JElzgdsA65dD7RyEl8ws4NwdKjP5AsPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a763331899b4bb5502382ce1d5dfc8a35d857e27 commit a763331899b4bb5502382ce1d5dfc8a35d857e27 Author: Konstantin Belousov AuthorDate: 2022-09-21 13:55:44 +0000 Commit: Konstantin Belousov CommitDate: 2022-10-13 04:46:01 +0000 ldd: use direct exec mode unconditionally PR: 127276, 175339, 231926 (cherry picked from commit 9cabef3d146e9a844813b6bc8952d6cf2e9d45e5) --- usr.bin/ldd/ldd.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index c16b6f5e8496..8897c8cbfbc2 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -233,18 +233,19 @@ main(int argc, char *argv[]) } break; case 0: + rtld = _PATH_RTLD; +#if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) + if (type == TYPE_ELF32) + rtld = _COMPAT32_PATH_RTLD; +#endif if (is_shlib == 0) { - execl(*argv, *argv, (char *)NULL); + execl(rtld, rtld, "--", + *argv, (char *)NULL); warn("%s", *argv); } else if (fmt1 == NULL && fmt2 == NULL && !aflag) { dlopen(*argv, RTLD_TRACE); warnx("%s: %s", *argv, dlerror()); } else { - rtld = _PATH_RTLD; -#if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) - if (type == TYPE_ELF32) - rtld = _COMPAT32_PATH_RTLD; -#endif execl(rtld, rtld, "-d", "--", *argv, (char *)NULL); }