git: e8b954f136a7 - stable/13 - ldd: also use exec mode for -a

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Fri, 19 Nov 2021 04:36:41 UTC
The branch stable/13 has been updated by kib:

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

commit e8b954f136a7af19c44e16c11335abb9fb5fa7d1
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-11-15 20:45:51 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-11-19 04:25:28 +0000

    ldd: also use exec mode for -a
    
    PR:     259069
    
    (cherry picked from commit 7d20a08076b4c9d4513585a01fc57c39be654edf)
---
 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 {