summaryrefslogtreecommitdiffstats
path: root/usr.bin/symorder
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1994-10-16 22:01:44 +0000
committerphk <phk@FreeBSD.org>1994-10-16 22:01:44 +0000
commit0c882a91f1e60f0ae520fe7279c4db80c1c3dfcf (patch)
treea8e94e5b1faabdc3c11723fdd524a1efab406c1c /usr.bin/symorder
parentca4647b8890a62737616b2add2388df3e4d83390 (diff)
downloadFreeBSD-src-0c882a91f1e60f0ae520fe7279c4db80c1c3dfcf.zip
FreeBSD-src-0c882a91f1e60f0ae520fe7279c4db80c1c3dfcf.tar.gz
Symorder complains if INET isn't in the kernel. I added '-m' to inform it
that it should exit(0) even if this is so. fixed a /386bsd -> /kernel in the man-page while at it.
Diffstat (limited to 'usr.bin/symorder')
-rw-r--r--usr.bin/symorder/symorder.15
-rw-r--r--usr.bin/symorder/symorder.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/symorder/symorder.1 b/usr.bin/symorder/symorder.1
index bc9ea86..5fe6964 100644
--- a/usr.bin/symorder/symorder.1
+++ b/usr.bin/symorder/symorder.1
@@ -39,6 +39,7 @@
.Nd rearrange name list
.Sh SYNOPSIS
.Nm symorder
+.Fl m
.Fl t Ar symlist file
.Sh DESCRIPTION
The file
@@ -57,11 +58,13 @@ are relocated to the beginning of the table and in the order given.
.It Fl t
Restrict the symbol table to the symbols listed in
.Ar symlist .
+.It Fl m
+Exit with status zero, even if some symbols are missing.
.El
.Pp
This program was specifically designed to cut down on the
overhead of getting symbols from
-.Pa /386bsd.
+.Pa /kernel.
.Sh DIAGNOSTICS
The
.Nm symorder
diff --git a/usr.bin/symorder/symorder.c b/usr.bin/symorder/symorder.c
index 4c41a14..33ba760 100644
--- a/usr.bin/symorder/symorder.c
+++ b/usr.bin/symorder/symorder.c
@@ -67,7 +67,7 @@ struct exec exec;
struct stat stb;
struct nlist *newtab, *symtab;
off_t sa;
-int nsym, strtabsize, symfound, small;
+int nsym, strtabsize, symfound, small, missing;
char *kfile, *newstrings, *strings, asym[BUFSIZ];
main(argc, argv)
@@ -82,11 +82,13 @@ main(argc, argv)
register char *start, *t;
int ch, n, o;
- while ((ch = getopt(argc, argv, "t")) != EOF)
+ while ((ch = getopt(argc, argv, "tm")) != EOF)
switch(ch) {
case 't':
small = 1;
break;
+ case 'm':
+ missing = 1;
case '?':
default:
usage();
@@ -205,7 +207,8 @@ main(argc, argv)
for (i = 0; i < nsym; i++)
if (order[i].n_value == 0)
printf("%s\n", order[i].n_un.n_name);
- exit(NOTFOUNDEXIT);
+ if(!missing)
+ exit(NOTFOUNDEXIT);
}
exit(OKEXIT);
}
OpenPOWER on IntegriCloud