summaryrefslogtreecommitdiffstats
path: root/usr.bin/symorder
diff options
context:
space:
mode:
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