Download raw body.
ldd(1): remove unimplemented -x option
Hi,
ldd(1) accepts -x but immediately errors with "not yet implemented".
This stub has been in place for over 10 years and neither FreeBSD nor
NetBSD have this option. The man page already has -x commented out.
This removes the dead code.
ok?
Index: src/libexec/ld.so/ldd/ldd.c
===================================================================
RCS file: /cvs/src/libexec/ld.so/ldd/ldd.c,v
retrieving revision 1.26
diff -u -r1.26 ldd.c
--- src/libexec/ld.so/ldd/ldd.c 15 Aug 2023 13:50:53 -0000 1.26
+++ src/libexec/ld.so/ldd/ldd.c 6 Jan 2026 14:31:33 -0000
@@ -46,28 +46,13 @@
int
main(int argc, char **argv)
{
- int c, xflag, ret;
+ int ret;
if (pledge("stdio rpath proc exec prot_exec", NULL) == -1)
err(1, "pledge");
- xflag = 0;
- while ((c = getopt(argc, argv, "x")) != -1) {
- switch (c) {
- case 'x':
- xflag = 1;
- break;
- default:
- usage();
- /*NOTREACHED*/
- }
- }
-
- if (xflag)
- errx(1, "-x not yet implemented");
-
- argc -= optind;
- argv += optind;
+ argc--;
+ argv++;
if (argc == 0)
usage();
ldd(1): remove unimplemented -x option