(_dl_lookup_symbol): Test WEAK_VALUE.s rather than WEAK_VALUE.a to see if a
authorroland <roland>
Wed, 6 Sep 1995 23:40:55 +0000 (23:40 +0000)
committerroland <roland>
Wed, 6 Sep 1995 23:40:55 +0000 (23:40 +0000)
weak value has been set.  A valid weak value may set WEAK_VALUE.a to 0.

elf/dl-lookup.c

index ca0f034..62802dd 100644 (file)
@@ -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;