summaryrefslogtreecommitdiff
path: root/elf/dl-object.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-09-07 07:57:11 +0000
committerUlrich Drepper <drepper@redhat.com>2001-09-07 07:57:11 +0000
commit5a21d307c518c911f81848b6c0056fcc39e3ddcd (patch)
tree9b2c8e176909392cb03b76cf2eb5d29e61c55d40 /elf/dl-object.c
parentb98e518f5627b95c79bf75d178ae41527c333886 (diff)
downloadglibc-5a21d307c518c911f81848b6c0056fcc39e3ddcd.tar.gz
Update.
2001-09-07 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'elf/dl-object.c')
-rw-r--r--elf/dl-object.c6
1 files changed, 6 insertions, 0 deletions
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;