Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Nov 2021 20:49:41 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7d20a08076b4 - main - ldd: also use exec mode for -a
Message-ID:  <202111152049.1AFKnfIT041511@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=7d20a08076b4c9d4513585a01fc57c39be654edf

commit 7d20a08076b4c9d4513585a01fc57c39be654edf
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-15 20:45:51 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-15 20:49:33 +0000

    ldd: also use exec mode for -a
    
    The -a option also requires passing specific environment variables to
    instance of rtld doing tracing.
    
    PR:     259069
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 usr.bin/ldd/ldd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c
index 492e29dff211..c16b6f5e8496 100644
--- a/usr.bin/ldd/ldd.c
+++ b/usr.bin/ldd/ldd.c
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
 			if (is_shlib == 0) {
 				execl(*argv, *argv, (char *)NULL);
 				warn("%s", *argv);
-			} else if (fmt1 == NULL && fmt2 == NULL) {
+			} else if (fmt1 == NULL && fmt2 == NULL && !aflag) {
 				dlopen(*argv, RTLD_TRACE);
 				warnx("%s: %s", *argv, dlerror());
 			} else {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111152049.1AFKnfIT041511>