From 7d20a08076b4c9d4513585a01fc57c39be654edf Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Mon, 15 Nov 2021 22:45:51 +0200 Subject: [PATCH] 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 {