summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/ld/ld.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-12-22 20:54:17 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-12-22 20:54:17 +0000
commitb98ae97fdfd4cae418247cb7fff8c1cf989e83f4 (patch)
tree90cb37344dd03ecc6778dec64e3a416b42bdddfe /gnu/usr.bin/ld/ld.c
parent17241ed3bf77ebd2dba5d1aa9ba5922685758501 (diff)
Correct handling of weak symbols in shared libraries; from pk@netbsd.org
Diffstat (limited to 'gnu/usr.bin/ld/ld.c')
-rw-r--r--gnu/usr.bin/ld/ld.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c
index e2230e0b00f..df0c8d9f245 100644
--- a/gnu/usr.bin/ld/ld.c
+++ b/gnu/usr.bin/ld/ld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ld.c,v 1.4 1996/06/17 00:15:37 deraadt Exp $ */
+/* $OpenBSD: ld.c,v 1.5 1996/12/22 20:54:16 tholo Exp $ */
/*-
* This code is derived from software copyrighted by the Free Software
@@ -1364,7 +1364,8 @@ enter_global_ref(lsp, name, entry)
lsp->nzlist.nz_value = 0;
make_executable = 0;
} else {
- global_alias_count++;
+ if ((entry->flags & E_DYNAMIC) == 0)
+ global_alias_count++;
}
#if 0
if (sp->flags & GS_REFERENCED)
@@ -1400,7 +1401,8 @@ enter_global_ref(lsp, name, entry)
if (com)
common_defined_global_count--;
sp->common_size = 0;
- sp->defined = 0;
+ if (sp != dynamic_symbol)
+ sp->defined = 0;
}
/*