From 777a2b8bb030659b6fdba9682de66dbeca1c14b9 Mon Sep 17 00:00:00 2001 From: mycroft Date: Fri, 13 Sep 2002 03:40:40 +0000 Subject: [PATCH] If we match a symbol name, but it's undefined, do not continue searching the hash chain. --- libexec/ld.elf_so/symbol.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libexec/ld.elf_so/symbol.c b/libexec/ld.elf_so/symbol.c index e94b0a17aed9..6728f2384bfb 100644 --- a/libexec/ld.elf_so/symbol.c +++ b/libexec/ld.elf_so/symbol.c @@ -1,4 +1,4 @@ -/* $NetBSD: symbol.c,v 1.18 2002/09/12 22:56:29 mycroft Exp $ */ +/* $NetBSD: symbol.c,v 1.19 2002/09/13 03:40:40 mycroft Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -134,9 +134,10 @@ _rtld_symlook_obj(name, hash, obj, in_plt) || (!in_plt && symp->st_value != 0 && ELF_ST_TYPE(symp->st_info) == STT_FUNC) #endif - ) { + ) return symp; - } + else + return NULL; } symnum = obj->chains[symnum]; }