From owner-dev-commits-src-branches@freebsd.org Fri Sep 3 01:08:58 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E4C5C66C203; Fri, 3 Sep 2021 01:08:58 +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 4H106y4skqz4ZTl; Fri, 3 Sep 2021 01:08:58 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 868FA230EF; Fri, 3 Sep 2021 01:08:58 +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 18318waK004702; Fri, 3 Sep 2021 01:08:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18318w22004701; Fri, 3 Sep 2021 01:08:58 GMT (envelope-from git) Date: Fri, 3 Sep 2021 01:08:58 GMT Message-Id: <202109030108.18318w22004701@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: d5d99c1c0725 - stable/13 - ldd: Remove non-functional -v option 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: d5d99c1c072534391da976226f719e07f0ec3205 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Sep 2021 01:08:59 -0000 The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d5d99c1c072534391da976226f719e07f0ec3205 commit d5d99c1c072534391da976226f719e07f0ec3205 Author: Konstantin Belousov AuthorDate: 2021-08-28 17:28:54 +0000 Commit: Konstantin Belousov CommitDate: 2021-09-03 01:08:35 +0000 ldd: Remove non-functional -v option (cherry picked from commit 17fc43bc01011ed05f614f266350d37f7020a59d) --- usr.bin/ldd/ldd.1 | 18 +----------------- usr.bin/ldd/ldd.c | 20 ++++++-------------- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/usr.bin/ldd/ldd.1 b/usr.bin/ldd/ldd.1 index 2a90d5ac537d..d263eabcf4ff 100644 --- a/usr.bin/ldd/ldd.1 +++ b/usr.bin/ldd/ldd.1 @@ -1,6 +1,6 @@ .\" $FreeBSD$ .\" -.Dd October 23, 2018 +.Dd August 28, 2021 .Dt LDD 1 .Os .Sh NAME @@ -9,7 +9,6 @@ .Sh SYNOPSIS .Nm .Op Fl a -.Op Fl v .Op Fl f Ar format .Ar program ... .Sh DESCRIPTION @@ -47,16 +46,6 @@ The .Fl a option displays the list of all objects that are needed by each loaded object. -This option does not work with -.Xr a.out 5 -binaries. -.Pp -The -.Fl v -option displays a verbose listing of the dynamic linking headers -encoded in the executable. -See the source code and include -files for the definitive meaning of all the fields. .Sh IMPLEMENTATION NOTES .Nm lists the dependencies of an executable by setting @@ -82,8 +71,3 @@ A .Nm utility first appeared in SunOS 4.0, it appeared in its current form in .Fx 1.1 . -.Pp -The -.Fl v -support is based on code written by -.An John Polstra Aq Mt jdp@polstra.com diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index f948b7312863..3353345d549d 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -83,7 +83,7 @@ static void usage(void); #define _PATH_LDD32 "/usr/bin/ldd32" static int -execldd32(char *file, char *fmt1, char *fmt2, int aflag, int vflag) +execldd32(char *file, char *fmt1, char *fmt2, int aflag) { char *argv[9]; int i, rval, status; @@ -94,8 +94,6 @@ execldd32(char *file, char *fmt1, char *fmt2, int aflag, int vflag) argv[i++] = strdup(_PATH_LDD32); if (aflag) argv[i++] = strdup("-a"); - if (vflag) - argv[i++] = strdup("-v"); if (fmt1 != NULL) { argv[i++] = strdup("-f"); argv[i++] = strdup(fmt1); @@ -136,12 +134,12 @@ int main(int argc, char *argv[]) { char *fmt1, *fmt2; - int rval, c, aflag, vflag; + int rval, c, aflag; - aflag = vflag = 0; + aflag = 0; fmt1 = fmt2 = NULL; - while ((c = getopt(argc, argv, "af:v")) != -1) { + while ((c = getopt(argc, argv, "af:")) != -1) { switch (c) { case 'a': aflag++; @@ -154,9 +152,6 @@ main(int argc, char *argv[]) } else fmt1 = optarg; break; - case 'v': - vflag++; - break; default: usage(); /* NOTREACHED */ @@ -165,9 +160,6 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; - if (vflag && fmt1 != NULL) - errx(1, "-v may not be used with -f"); - if (argc <= 0) { usage(); /* NOTREACHED */ @@ -194,7 +186,7 @@ main(int argc, char *argv[]) break; #if __ELF_WORD_SIZE > 32 && defined(ELF32_SUPPORTED) case TYPE_ELF32: - rval |= execldd32(*argv, fmt1, fmt2, aflag, vflag); + rval |= execldd32(*argv, fmt1, fmt2, aflag); continue; #endif case TYPE_UNKNOWN: @@ -259,7 +251,7 @@ static void usage(void) { - fprintf(stderr, "usage: ldd [-a] [-v] [-f format] program ...\n"); + fprintf(stderr, "usage: ldd [-a] [-f format] program ...\n"); exit(1); }