From 65bf5fa3172ab9d77fd1792fae68ad85eed2a7b1 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 12 Dec 1995 02:42:14 +0000 Subject: Regenerated Fri Dec 8 13:04:51 1995 Roland McGrath * posix/glob.c: Implement new options GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_TILDE, GLOB_NOMAGIC. (glob): Use stat instead of lstat to determine directoriness. * posix/glob.h (GLOB_ALTDIRFUNC, GLOB_BRACE, GLOB_NOMAGIC, GLOB_TILDE): New flag bits. (__GLOB_FLAGS): Include them. (glob_t): New members gl_closedir, gl_readdir, gl_opendir, gl_lstat, gl_stat. --- elf/dl-init.c | 5 +++-- elf/rtld.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'elf') diff --git a/elf/dl-init.c b/elf/dl-init.c index c44a73f29b..7375c5f782 100644 --- a/elf/dl-init.c +++ b/elf/dl-init.c @@ -62,7 +62,8 @@ _dl_init_next (void) } } - if (l->l_info[DT_INIT]) + if (l->l_info[DT_INIT] && + !(l->l_name[0] == '\0' && l->l_type == lt_executable)) { /* Run this object's initializer. */ l->l_init_running = 1; @@ -76,7 +77,7 @@ _dl_init_next (void) } /* Look for the first initializer not yet called. */ - l = _dl_loaded->l_next; /* Skip the executable itself. */ + l = _dl_loaded; do { init = next_init (l); diff --git a/elf/rtld.c b/elf/rtld.c index 62d6488767..f91ffc77ef 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -182,8 +182,7 @@ of this helper program; chances are you did not intend to run this program.\n", l = _dl_map_object (NULL, _dl_argv[0]); phdr = l->l_phdr; phent = l->l_phnum; - l->l_type = lt_executable; - l->l_libname = (char *) ""; + l->l_name = (char *) ""; *user_entry = l->l_entry; } else @@ -270,6 +269,7 @@ of this helper program; chances are you did not intend to run this program.\n", { struct link_map *new; new = _dl_map_object (l, strtab + d->d_un.d_val); + new->l_type = lt_library; if (!before_rtld && new == &rtld_map) before_rtld = last; last = new; -- cgit v1.2.3