diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-12-27 17:15:12 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-12-27 17:15:12 +0000 |
commit | 8352b484cfe1c87f99d41e976da5427082fed58c (patch) | |
tree | d0d2b64bfc72795f3e8b61c0c5a86ba27b4259e9 /elf/dl-lookup.c | |
parent | 47b33891c421559c74273348c57fa6ba4e6502c7 (diff) | |
download | glibc-8352b484cfe1c87f99d41e976da5427082fed58c.tar.gz glibc-8352b484cfe1c87f99d41e976da5427082fed58c.tar.xz glibc-8352b484cfe1c87f99d41e976da5427082fed58c.zip |
(_dl_num_relocations): New variable. (do_lookup): Increment _dl_num_relocations for every call.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r-- | elf/dl-lookup.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 8c99f499fd..01d71678b4 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -56,6 +56,9 @@ struct sym_val result; \ }) +/* Statistics function. */ +unsigned long int _dl_num_relocations; + /* Inner part of the lookup functions. We return a value > 0 if we found the symbol, the value 0 if nothing is found and < 0 if @@ -71,6 +74,8 @@ do_lookup (const char *undef_name, unsigned long int hash, size_t n = scope->r_nlist; struct link_map *map; + ++_dl_num_relocations; + for (; i < n; ++i) { const ElfW(Sym) *symtab; @@ -79,7 +84,7 @@ do_lookup (const char *undef_name, unsigned long int hash, ElfW(Symndx) symidx; int num_versions = 0; const ElfW(Sym) *sym; - const ElfW(Sym) *versioned_sym; + const ElfW(Sym) *versioned_sym = NULL; map = list[i]; |