diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-10-16 22:01:44 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1994-10-16 22:01:44 +0000 |
| commit | 3972fa66700340cc194d2d3529704810b65ef628 (patch) | |
| tree | a8e94e5b1faabdc3c11723fdd524a1efab406c1c | |
| parent | afc889a2801b9cb83d00a854c6b171144dec1c0f (diff) | |
Notes
| -rw-r--r-- | usr.bin/symorder/symorder.1 | 5 | ||||
| -rw-r--r-- | usr.bin/symorder/symorder.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/usr.bin/symorder/symorder.1 b/usr.bin/symorder/symorder.1 index bc9ea866a191..5fe696432363 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 4c41a14b7055..33ba760d0127 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); } |
