From 5a21d307c518c911f81848b6c0056fcc39e3ddcd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 7 Sep 2001 07:57:11 +0000 Subject: Update. 2001-09-07 Ulrich Drepper * include/link.h (struct link_map): Add l_scope_mem and l_scope_max elements. Change l_scope to be a pointer only. * elf/dl-object.c (_dl_new_ojbect): Initialize l_scope and l_scope_max. * elf/dl-open.c (dl_open_worker): If dependency wasn't just opened here add searchlist of newly open file to the dependency's scope. * elf/dl-close.c (_dl_close): If dependency is used otherwise remove only searchlist from its scope. Free own scope array if necessary. * elf/Makefile (tests): Add dblload and dblunload now. --- elf/dl-object.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'elf/dl-object.c') diff --git a/elf/dl-object.c b/elf/dl-object.c index 07e428e8e6..9c32c08ff2 100644 --- a/elf/dl-object.c +++ b/elf/dl-object.c @@ -50,6 +50,12 @@ _dl_new_object (char *realname, const char *libname, int type, new->l_loader = loader; /* new->l_global = 0; We use calloc therefore not necessary. */ + /* Use the 'l_scope_mem' array by default for the the 'l_scope' + information. If we need more entries we will allocate a large + array dynamically. */ + new->l_scope = new->l_scope_mem; + new->l_scope_max = sizeof (new->l_scope_mem) / sizeof (new->l_scope_mem[0]); + /* Counter for the scopes we have to handle. */ idx = 0; -- cgit v1.2.3