only give warning about unresolved references if -u option is not given

This commit is contained in:
ceriel 1989-10-16 14:52:03 +00:00
parent 7b969cc623
commit 85da3bcac1
2 changed files with 6 additions and 2 deletions

View file

@ -138,8 +138,10 @@ main(argc, argv)
if (BADMAGIC(outhead)) if (BADMAGIC(outhead))
fatal("Not an ack object file.\n"); fatal("Not an ack object file.\n");
if (outhead.oh_flags & HF_LINK) { if (outhead.oh_flags & HF_LINK) {
if (! unresolved) {
fprintf(stderr,"Warning: contains unresolved references.\n");
}
unresolved++; unresolved++;
fprintf(stderr,"Warning: contains unresolved references.\n");
} }
else if (outhead.oh_nrelo > 0) else if (outhead.oh_nrelo > 0)
fprintf(stderr, "Warning: relocation information present.\n"); fprintf(stderr, "Warning: relocation information present.\n");

View file

@ -138,8 +138,10 @@ main(argc, argv)
if (BADMAGIC(outhead)) if (BADMAGIC(outhead))
fatal("Not an ack object file.\n"); fatal("Not an ack object file.\n");
if (outhead.oh_flags & HF_LINK) { if (outhead.oh_flags & HF_LINK) {
if (! unresolved) {
fprintf(stderr,"Warning: contains unresolved references.\n");
}
unresolved++; unresolved++;
fprintf(stderr,"Warning: contains unresolved references.\n");
} }
else if (outhead.oh_nrelo > 0) else if (outhead.oh_nrelo > 0)
fprintf(stderr, "Warning: relocation information present.\n"); fprintf(stderr, "Warning: relocation information present.\n");