summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/lib.c
diff options
context:
space:
mode:
authorPaul Richards <paul@FreeBSD.org>1993-11-09 04:19:36 +0000
committerPaul Richards <paul@FreeBSD.org>1993-11-09 04:19:36 +0000
commit3923b0019c438b595e77d8f73d62b37147df25f8 (patch)
treea0a32c784e66fc50e42eb3f64dc3fad913ef449c /gnu/usr.bin/ld/lib.c
parentbde1866a63c583c78d524c7261239c5fa78ed03e (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/ld/lib.c')
-rw-r--r--gnu/usr.bin/ld/lib.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c
index 2ce8efbe287b..d66f3df2924d 100644
--- a/gnu/usr.bin/ld/lib.c
+++ b/gnu/usr.bin/ld/lib.c
@@ -1,5 +1,5 @@
/*
- * $Id: lib.c,v 1.3 1993/11/01 16:26:17 pk Exp $ - library routines
+ * $Id: lib.c,v 1.4 1993/11/05 12:43:11 pk Exp $ - library routines
*/
#include <sys/param.h>
@@ -228,7 +228,8 @@ symdef_library(desc, entry, member_length)
* global common 'utime' linked to a function).
*/
if (!(link_mode & FORCEARCHIVE) &&
- (!sp || !sp->referenced || sp->defined))
+ (!sp || sp->defined ||
+ (!sp->referenced && !sp->sorefs)) )
continue;
/*
@@ -478,14 +479,16 @@ subfile_wanted_p(entry)
if ( (type & N_EXT) &&
(type & N_STAB) == 0 &&
type != (N_UNDF | N_EXT))
- goto xxx;
+ break; /* We need it */
}
+ if (lsp != NULL)
+ continue; /* We don't need it */
+
if (write_map) {
print_file_name(entry, stdout);
fprintf(stdout, " needed due to shared lib ref %s\n", sp->name);
}
return 1;
- xxx: ;
}
}