diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-04-03 03:51:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-04-03 03:51:04 +0000 |
commit | cf197e41e7e468697e5a8d7b3f4c4930dd557990 (patch) | |
tree | e1872dc669824d35aa47cc9964aa6fe9ea159f7b /elf/dl-load.c | |
parent | ec79422d9e17bd5388a3fc34fcd2ef434e0cac26 (diff) | |
download | glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.zip glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.tar.gz glibc-cf197e41e7e468697e5a8d7b3f4c4930dd557990.tar.bz2 |
Update.
2000-04-02 Ulrich Drepper <drepper@redhat.com>
* elf/dl-fini.c (_dl_fini): Increment j counter after swapping in
element at this position.
* elf/Versions [ld.so] (GLIBC_2.2): Export _dl_load_lock.
* elf/link.h (struct link_map): Add l_reldepsmax, l_reldepsact, and
l_reldeps elements.
* elf/dl-lookup.c (add_dependency): New function.
(_dl_lookup_symbol): Use it whenever symbol was found in a global,
dynamically loaded object.
(_dl_lookup_symbol_skip): Likewise.
(_dl_lookup_versioned_symbol): Likewise.
(_dl_lookup_versioned_symbol_skip): Likewise.
* elf/dl-open.c: Don't define _dl_load_lock here...
* elf/rtld.c: ...but here...
* elf/dl-support.c: ...and here.
* elf/dl-close.c (_dl_close): Close also dependent objects introduce
through relocation.
* elf/dl-fini.c (_dl_fini): Also take dependencies introduced through
relocations.
* dlfcn/Makefile (glrefmain.out): Test is not expected to fail
anymore.
* dlfcn/glrefmain.c: Add one more debug message.
* Makeconfig (preprocess-versions): Don't add $(CPPFLAGS) to compiler
command line.
* Makerules (sysd-versions): Use ( ) instead of { }.
* elf/dl-load.c: Use __builtin_expect to signal that compiler should
optimize for the non-debugging case.
* elf/dl-lookup.c: Likewise.
* sysdeps/generic/libc-start.c: Likewise.
Diffstat (limited to 'elf/dl-load.c')
-rw-r--r-- | elf/dl-load.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c index 5d1463b..e57de81 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c @@ -748,7 +748,7 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname, } /* Print debugging message. */ - if (_dl_debug_files) + if (__builtin_expect (_dl_debug_files, 0)) _dl_debug_message (1, "file=", name, "; generating link map\n", NULL); /* Read the header directly. */ @@ -1046,7 +1046,7 @@ _dl_map_object_from_fd (const char *name, int fd, char *realname, l->l_entry += l->l_addr; - if (_dl_debug_files) + if (__builtin_expect (_dl_debug_files, 0)) { const size_t nibbles = sizeof (void *) * 2; char buf1[nibbles + 1]; @@ -1182,7 +1182,8 @@ open_path (const char *name, size_t namelen, int preloaded, /* If we are debugging the search for libraries print the path now if it hasn't happened now. */ - if (_dl_debug_libs && current_what != this_dir->what) + if (__builtin_expect (_dl_debug_libs, 0) + && current_what != this_dir->what) { current_what = this_dir->what; print_search_path (dirs, current_what, this_dir->where); @@ -1202,7 +1203,7 @@ open_path (const char *name, size_t namelen, int preloaded, - buf); /* Print name we try if this is wanted. */ - if (_dl_debug_libs) + if (__builtin_expect (_dl_debug_libs, 0)) _dl_debug_message (1, " trying file=", buf, "\n", NULL); fd = __open (buf, O_RDONLY); @@ -1316,7 +1317,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, } /* Display information if we are debugging. */ - if (_dl_debug_files && loader != NULL) + if (__builtin_expect (_dl_debug_files, 0) && loader != NULL) _dl_debug_message (1, "\nfile=", name, "; needed by ", loader->l_name[0] ? loader->l_name : _dl_argv[0], "\n", NULL); @@ -1327,7 +1328,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, size_t namelen = strlen (name) + 1; - if (_dl_debug_libs) + if (__builtin_expect (_dl_debug_libs, 0)) _dl_debug_message (1, "find library=", name, "; searching\n", NULL); fd = -1; @@ -1411,7 +1412,7 @@ _dl_map_object (struct link_map *loader, const char *name, int preloaded, fd = open_path (name, namelen, preloaded, rtld_search_dirs, &realname); /* Add another newline when we a tracing the library loading. */ - if (_dl_debug_libs) + if (__builtin_expect (_dl_debug_libs, 0)) _dl_debug_message (1, "\n", NULL); } else |