From 604510f7170a912e7abd352d61b7686445216904 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Oct 1998 13:40:55 +0000 Subject: Update. 1998-10-07 Ulrich Drepper * elf/dl-open.c (_dl_global_scope_alloc): Make global. (dl_open_worker): Use realloc, not malloc to resize array. * elf/rtld.c (_dl_initial_searchlist): New variable. (_dl_main): Copy content of _dl_main_searchlist to _dl_initial_searchlist. * elf/ldsodefs.h: Add declarations for _dl_initial_searchlist and _dl_global_scope_alloc. * elf/Versions [libc, GLIBC_2.1]: Add _dl_initial_searchlist. * elf/dl-close.c (_dl_close): When removing object with global scope remove allocated searchlist if no dynamically loaded object is on it anymore. * elf/dl-support.c (_dl_initial_searchlist): Renamed from fake_scope. (_dl_global_scope, _dl_main_searchlist): Use _dl_initial_searchlist. * malloc/mtrace.c (tr_where): Don't print space in location string, print it afterwards. Print better symbol name information. --- elf/dl-support.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'elf/dl-support.c') diff --git a/elf/dl-support.c b/elf/dl-support.c index 1126d46771..450c9c90df 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -66,15 +66,15 @@ const char *_dl_origin_path; struct link_map *_dl_loaded; /* Fake scope. In dynamically linked binaries this is the scope of the - main application but here we don't have something like this. So + main application but here we don't have something like this. So create a fake scope containing nothing. */ -static struct r_scope_elem fake_scope; +struct r_scope_elem _dl_initial_searchlist; /* Variable which can be used in lookup to process the global scope. */ -struct r_scope_elem *_dl_global_scope[2] = { &fake_scope, NULL }; +struct r_scope_elem *_dl_global_scope[2] = { &_dl_initial_searchlist, NULL }; /* This is a global pointer to this structure which is public. It is used by dlopen/dlclose to add and remove objects from what is regarded to be the global scope. */ -struct r_scope_elem *_dl_main_searchlist = &fake_scope; +struct r_scope_elem *_dl_main_searchlist = &_dl_initial_searchlist; static void non_dynamic_init (void) __attribute__ ((unused)); -- cgit v1.2.3