about summary refs log tree commit diff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index bbccbc01ef..7ceffa23e1 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -129,7 +129,8 @@ _dl_lookup_symbol (const char *undef_name, const ElfW(Sym) **ref,
 	  }
       }
 
-  if (weak_value.s == NULL && ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
+  if (weak_value.s == NULL &&
+      !*ref || ELFW(ST_BIND) ((*ref)->st_info) != STB_WEAK)
     {
       /* We could find no value for a strong reference.  */
       const char msg[] = "undefined symbol: ";