From 74780cf659d1e5cd91e82b6e5314dcfc7bba033b Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 12 Jun 2005 16:29:51 +0000 Subject: * elf/dl-error.c (_dl_signal_error): Store information about use of real malloc in the catch object. (_dl_catch_error): Forward information about malloc use to caller in new parameter. (_dl_out_of_memory): Make static. * elf/dl-deps.c: Adjust callers of _dl_catch_error. * elf/dl-libc.c: Likewise. * elf/dl-open.c: Likewise. * elf/rtld.c: Likewise. Add new --audit option. * sysdeps/generic/ldsodefs.h: Remove _dl_out_of_memory declaration. (rtld_global_ro._dl_signal_error): Add new parameter. * include/dlfcn.h (_dl_catch_error): Add new parameter. * dlfcn/dlfcn.c (_dlerror_run): Pass additional parameter to _dl_catch_error. Only free if the returned newly value says so. --- include/dlfcn.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/dlfcn.h') diff --git a/include/dlfcn.h b/include/dlfcn.h index 460c037..9144dd2 100644 --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -1,6 +1,7 @@ #ifndef _DLFCN_H #include #include /* For ElfW. */ +#include /* Internally used flag. */ #define __RTLD_DLOPEN 0x80000000 @@ -67,9 +68,10 @@ extern void *_dl_vsym (void *handle, const char *name, const char *version, and the error code passed is the return value and *OBJNAME is set to the object name which experienced the problems. ERRSTRING if nonzero points to a malloc'ed string which the caller has to free after use. - ARGS is passed as argument to OPERATE. */ + ARGS is passed as argument to OPERATE. MALLOCEDP is set to true only + if the returned string is allocated using the libc's malloc. */ extern int _dl_catch_error (const char **objname, const char **errstring, - void (*operate) (void *), + bool *mallocedp, void (*operate) (void *), void *args) internal_function; -- cgit v1.1