summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-06-28 22:30:46 +0000
committerru <ru@FreeBSD.org>2003-06-28 22:30:46 +0000
commitbff3635b312638461e1292b9a3c0427ce7b727f9 (patch)
treef1811295ed36d40db4812c58effbc5c205cf29c2 /usr.bin
parent931338543684c8280f1ecd1d2a2eb4fd7c88b02c (diff)
downloadFreeBSD-src-bff3635b312638461e1292b9a3c0427ce7b727f9.zip
FreeBSD-src-bff3635b312638461e1292b9a3c0427ce7b727f9.tar.gz
Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here). Sort options. Print the file name on error.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/elfdump/elfdump.16
-rw-r--r--usr.bin/elfdump/elfdump.c4
2 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/elfdump/elfdump.1 b/usr.bin/elfdump/elfdump.1
index f310cdb..c159c7d 100644
--- a/usr.bin/elfdump/elfdump.1
+++ b/usr.bin/elfdump/elfdump.1
@@ -34,7 +34,7 @@
files
.Sh SYNOPSIS
.Nm
-.Op Fl a | cdeiGhnprs
+.Fl a | cdeGhinprs
.Op Fl w Ar file
.Ar file
.Sh DESCRIPTION
@@ -55,12 +55,12 @@ Dump shared headers.
Dump dynamic symbols.
.It Fl e
Dump ELF header.
-.It Fl i
-Dump the dynamic interpreter.
.It Fl G
Dump the GOT.
.It Fl h
Dump the hash values.
+.It Fl i
+Dump the dynamic interpreter.
.It Fl n
Dump note sections.
.It Fl p
diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c
index fd92c2d..89b24e9 100644
--- a/usr.bin/elfdump/elfdump.c
+++ b/usr.bin/elfdump/elfdump.c
@@ -441,7 +441,7 @@ main(int ac, char **av)
usage();
if ((fd = open(*av, O_RDONLY)) < 0 ||
fstat(fd, &sb) < 0)
- err(1, NULL);
+ err(1, "%s", *av);
e = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0);
if (e == MAP_FAILED)
err(1, NULL);
@@ -1109,6 +1109,6 @@ elf_get_quad(Elf32_Ehdr *e, void *base, elf_member_t member)
void
usage(void)
{
- fprintf(stderr, "usage: elfdump [-acdeiGhnprs] [-w file] filename\n");
+ fprintf(stderr, "usage: elfdump -a | -cdeGhinprs [-w file] file\n");
exit(1);
}
OpenPOWER on IntegriCloud