diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 25512bb6239c..e1e15d287e69 100644 --- a/gnu/usr.bin/ld/lib.c +++ b/gnu/usr.bin/ld/lib.c @@ -1,5 +1,5 @@ /* - * $Id: lib.c,v 1.11 1994/12/23 22:30:45 nate Exp $ - library routines + * $Id: lib.c,v 1.12 1995/03/04 17:46:08 nate Exp $ - library routines */ #include @@ -558,12 +558,9 @@ subfile_wanted_p(entry) } /* - * At this point, either the new symbol is a common - * and the shared object reference is undefined -- - * in which case we note the common -- or the shared - * object reference has a definition -- in which case - * the library member takes precedence. - */ + * If the shared object referenced is undefined + * then note is as a common. + */ if (iscommon) { /* * New symbol is common, just takes its @@ -585,11 +582,17 @@ subfile_wanted_p(entry) if (write_map) { print_file_name(entry, stdout); fprintf(stdout, - " needed due to shared lib ref %s (%d)\n", + " uneeded due to shared lib ref %s (%d)\n", sp->name, lsp ? lsp->nzlist.nlist.n_type : -1); } - return 1; + /* + * The shared object reference has a definition. + * Since it was previously defined in a shlib, it + * takes precedence over the new definition in the + * library member. + */ + return 0; } }