Make sure to call dlerror() to clear any error messages after the relocations
are done and there are no errors. This will prevent spurious undefined weak symbol errors being returned by dlerror(). Fixes PR bin/39240.
This commit is contained in:
parent
261002c777
commit
86d6d815ae
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: reloc.c,v 1.95 2006/03/04 08:58:46 skrll Exp $ */
|
||||
/* $NetBSD: reloc.c,v 1.96 2008/07/29 16:27:01 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1996 John D. Polstra.
|
||||
@ -39,7 +39,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: reloc.c,v 1.95 2006/03/04 08:58:46 skrll Exp $");
|
||||
__RCSID("$NetBSD: reloc.c,v 1.96 2008/07/29 16:27:01 matt Exp $");
|
||||
#endif /* not lint */
|
||||
|
||||
#include <err.h>
|
||||
@ -198,6 +198,7 @@ _rtld_relocate_objects(Obj_Entry *first, bool bind_now)
|
||||
if (!ok)
|
||||
return -1;
|
||||
|
||||
(void)dlerror(); /* clear any errors since all is good */
|
||||
|
||||
/* Set some sanity-checking numbers in the Obj_Entry. */
|
||||
obj->magic = RTLD_MAGIC;
|
||||
|
Loading…
Reference in New Issue
Block a user