1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00

* 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.
This commit is contained in:
Ulrich Drepper
2005-06-12 16:29:51 +00:00
parent 6dffebd8b4
commit 74780cf659
8 changed files with 108 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
#ifndef _DLFCN_H
#include <dlfcn/dlfcn.h>
#include <link.h> /* For ElfW. */
#include <stdbool.h>
/* 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;