summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/shlib.c
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>1999-02-20 05:53:32 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>1999-02-20 05:53:32 +0000
commitbbbc0796d6175153f1d371444f8f8127a6f008e8 (patch)
tree2b5548e28711f5cf9c654ea2dc9c91cfaa69b494 /gnu/usr.bin/ld/shlib.c
parentbc67be5243aa14727d92a670b07df0390134205a (diff)
fix library search problem; the linker would stop searching
for shared libs when the first was found... thus it would miss a newer version found later in the search path
Diffstat (limited to 'gnu/usr.bin/ld/shlib.c')
-rw-r--r--gnu/usr.bin/ld/shlib.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/gnu/usr.bin/ld/shlib.c b/gnu/usr.bin/ld/shlib.c
index f5e7f148c03..2482f373d6b 100644
--- a/gnu/usr.bin/ld/shlib.c
+++ b/gnu/usr.bin/ld/shlib.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: shlib.c,v 1.5 1999/02/20 05:53:31 marc Exp $
/* $NetBSD: shlib.c,v 1.13 1998/04/04 01:00:29 fvdl Exp $ */
/*
@@ -245,14 +246,12 @@ int do_dot_a;
DIR *dd = opendir(search_dirs[i]);
struct dirent *dp;
int found_dot_a = 0;
- int might_take_it;
if (dd == NULL)
continue;
- might_take_it = 0;
while ((dp = readdir(dd)) != NULL) {
- int n;
+ int n, might_take_it = 0;
if (do_dot_a && path == NULL &&
dp->d_namlen == len + 2 &&
@@ -309,9 +308,9 @@ int do_dot_a;
}
closedir(dd);
- if (found_dot_a || might_take_it)
+ if (found_dot_a)
/*
- * There's a lib in this dir; take it.
+ * There's a .a archive here.
*/
return path;
}