diff options
| author | pk <pk@NetBSD.org> | 1993-11-05 12:43:11 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 1993-11-05 12:43:11 +0000 |
| commit | fa3bfac6b231376ef2fb5253b983adaa5049be2d (patch) | |
| tree | acc829fb3907c2affaf325bd9e9d5cb73f89c98c /gnu | |
| parent | b7e4012f3141219d29390c9b554ca06ec0203a63 (diff) | |
Pull in archives containing definitions needed by shared objects.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/usr.bin/ld/ld/lib.c | 11 | ||||
| -rw-r--r-- | gnu/usr.bin/ld/lib.c | 11 |
2 files changed, 14 insertions, 8 deletions
diff --git a/gnu/usr.bin/ld/ld/lib.c b/gnu/usr.bin/ld/ld/lib.c index 2ce8efbe287..d66f3df2924 100644 --- a/gnu/usr.bin/ld/ld/lib.c +++ b/gnu/usr.bin/ld/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: ; } } diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 2ce8efbe287..d66f3df2924 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: ; } } |
