diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-02-21 16:56:57 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-02-21 16:56:57 +0000 |
commit | 931e3980342219ff95207bb2c2f0e660dc945f63 (patch) | |
tree | e7c69c48574834c5b4c8c0892f5708e2e56e0fb0 /gnu | |
parent | 5b876c83edaeef0d45ab9fc077659145cfe97f23 (diff) |
Revert the last revert. (with the bug fixed)
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index d29b195fe70..992e1633d94 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ld.c,v 1.14 2000/02/21 16:01:04 deraadt Exp $ */ +/* $OpenBSD: ld.c,v 1.15 2000/02/21 16:56:56 art Exp $ */ /* $NetBSD: ld.c,v 1.52 1998/02/20 03:12:51 jonathan Exp $ */ /*- @@ -1882,6 +1882,7 @@ digest_pass1() FOR_EACH_SYMBOL(i, sp) { symbol *spsave; struct localsymbol *lsp; + struct nlist *q = NULL; int defs = 0; if (!(sp->flags & GS_REFERENCED)) { @@ -2029,6 +2030,11 @@ digest_pass1() common_defined_global_count--; undefined_global_sym_count++; } + /* Let WEAK symbols take precedence over second class */ + if (q != NULL && N_ISWEAK(q) && + (lsp->entry->flags & E_SECONDCLASS)) + continue; + q = p; sp->def_lsp = lsp; sp->so_defined = type; |