diff options
author | Jakub Jelinek <jakub@redhat.com> | 2004-10-12 12:00:26 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2004-10-12 12:00:26 +0000 |
commit | 3ee87ca7d4c813087eeee8b9fd04b7836244a54a (patch) | |
tree | 30d5d50dce77cb2e80d0bead19ee23e7d0a38617 /elf | |
parent | 7dbf6a6cd568437c4b2fa14bcf5a1914cc267527 (diff) | |
download | glibc-3ee87ca7d4c813087eeee8b9fd04b7836244a54a.tar.gz glibc-3ee87ca7d4c813087eeee8b9fd04b7836244a54a.tar.xz glibc-3ee87ca7d4c813087eeee8b9fd04b7836244a54a.zip |
Updated to fedora-glibc-20041012T1128 cvs/fedora-glibc-2_3_3-67
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-addr.c | 8 | ||||
-rw-r--r-- | elf/dl-sym.c | 6 | ||||
-rw-r--r-- | elf/tst-dlopenrpath.c | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/elf/dl-addr.c b/elf/dl-addr.c index ae97398bad..c373eb3b17 100644 --- a/elf/dl-addr.c +++ b/elf/dl-addr.c @@ -28,7 +28,7 @@ _dl_addr (const void *address, Dl_info *info, struct link_map **mapp, const ElfW(Sym) **symbolp) { const ElfW(Addr) addr = DL_LOOKUP_ADDRESS (address); - struct link_map *l, *match; + struct link_map *match; const ElfW(Sym) *symtab, *matchsym, *symtabend; const char *strtab; ElfW(Word) strtabsize; @@ -38,7 +38,7 @@ _dl_addr (const void *address, Dl_info *info, /* Find the highest-addressed object that ADDRESS is not below. */ match = NULL; - for (l = GL(dl_loaded); l; l = l->l_next) + for (struct link_map *l = GL(dl_loaded); l; l = l->l_next) if (addr >= l->l_map_start && addr < l->l_map_end) { /* We know ADDRESS lies within L if in any shared object. @@ -67,8 +67,8 @@ _dl_addr (const void *address, Dl_info *info, info->dli_fbase = (void *) match->l_map_start; /* If this is the main program the information is incomplete. */ - if (__builtin_expect (l->l_name[0], 'a') == '\0' - && l->l_type == lt_executable) + if (__builtin_expect (match->l_name[0], 'a') == '\0' + && match->l_type == lt_executable) info->dli_fname = _dl_argv[0]; symtab = (const void *) D_PTR (match, l_info[DT_SYMTAB]); diff --git a/elf/dl-sym.c b/elf/dl-sym.c index c7c737804e..a94610263d 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -90,9 +90,9 @@ do_sym (void *handle, const char *name, void *who, { if (__builtin_expect (match == GL(dl_loaded), 0)) { - if (! GL(dl_loaded) - || caller < GL(dl_loaded)->l_map_start - || caller >= GL(dl_loaded)->l_map_end) + if (match == NULL + || caller < match->l_map_start + || caller >= match->l_map_end) GLRO(dl_signal_error) (0, NULL, NULL, N_("\ RTLD_NEXT used in code not dynamically loaded")); } diff --git a/elf/tst-dlopenrpath.c b/elf/tst-dlopenrpath.c index 964f103b8c..bd4d888f34 100644 --- a/elf/tst-dlopenrpath.c +++ b/elf/tst-dlopenrpath.c @@ -62,10 +62,8 @@ do_test (void) result = foo (); out: -#if 0 unlink (PFX "test-subdir/in-subdir.so"); rmdir (testsubdir); -#endif return result; } |