From 1571a01695e14ec40bbfb41e15161797fa24df96 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 7 Sep 1995 09:00:05 +0000 Subject: Wed Sep 6 19:41:10 1995 Roland McGrath * elf/dl-lookup.c (_dl_lookup_symbol): Test WEAK_VALUE.s rather than WEAK_VALUE.a to see if a weak value has been set. A valid weak value may set WEAK_VALUE.a to 0. --- elf/dl-lookup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'elf/dl-lookup.c') diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index ca0f03489d..62802ddea7 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -87,7 +87,7 @@ _dl_lookup_symbol (const char *undef_name, const Elf32_Sym **ref, return map->l_addr; case STB_WEAK: /* Weak definition. Use this value if we don't find another. */ - if (weak_value.a == 0) + if (! weak_value.s) { weak_value.s = sym; weak_value.a = map->l_addr; -- cgit v1.2.3