Emit a warning when a symbol is undefined.

This commit is contained in:
bouyer 2000-10-09 15:57:56 +00:00
parent 890345ee05
commit 64c818a7e2

View File

@ -1,4 +1,4 @@
/* $NetBSD: ncr53cxxx.c,v 1.2 2000/04/25 16:01:16 bouyer Exp $ */
/* $NetBSD: ncr53cxxx.c,v 1.3 2000/10/09 15:57:56 bouyer Exp $ */
/*
* Copyright (c) 1995,1999 Michael L. Hitch
@ -415,7 +415,7 @@ main (int argc, char *argv[])
if (outfp) {
time_t cur_time;
fprintf(outfp, "/*\t$NetBSD: ncr53cxxx.c,v 1.2 2000/04/25 16:01:16 bouyer Exp $\t*/\n");
fprintf(outfp, "/*\t$NetBSD: ncr53cxxx.c,v 1.3 2000/10/09 15:57:56 bouyer Exp $\t*/\n");
fprintf(outfp, "/*\n");
fprintf(outfp, " *\tDO NOT EDIT - this file is automatically generated.\n");
time(&cur_time);
@ -492,6 +492,11 @@ void emit_symbols ()
for (i = 0; i < nsymbols; ++i) {
char *code;
if ((symbols[i].flags & F_DEFINED) == 0 &&
symbols[i].type != S_EXTERNAL) {
fprintf(stderr, "warning: symbol %s undefined\n",
symbols[i].name);
}
if (symbols[i].type == S_ABSOLUTE)
code = "A_";
else if (symbols[i].type == S_RELATIVE)