mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-12 14:21:18 +08:00
Update.
* elf/dl-lookup.c: Only define or handle _dl_num_relocations for the SHARED version. * elf/dl-reloc.c: Likewise for _dl_num_cache_relocations.
This commit is contained in:
parent
e66d0a4c94
commit
be4b5a9555
@ -1,5 +1,9 @@
|
||||
2002-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* elf/dl-lookup.c: Only define or handle _dl_num_relocations for the
|
||||
SHARED version.
|
||||
* elf/dl-reloc.c: Likewise for _dl_num_cache_relocations.
|
||||
|
||||
* elf/rtld.c (_dl_start): Use __builtin_memset if available.
|
||||
|
||||
2002-01-29 Ben Collins <bcollins@debian.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Look up a symbol in the loaded objects.
|
||||
Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -59,8 +59,14 @@ struct sym_val
|
||||
result; \
|
||||
})
|
||||
|
||||
#ifdef SHARED
|
||||
/* Statistics function. */
|
||||
unsigned long int _dl_num_relocations;
|
||||
# define bump_num_relocation() ++_dl_num_relocations
|
||||
#else
|
||||
# define bump_num_relocation() 0
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* We have two different situations when looking up a simple: with or
|
||||
@ -215,7 +221,7 @@ _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
|
||||
struct r_scope_elem **scope;
|
||||
int protected;
|
||||
|
||||
++_dl_num_relocations;
|
||||
bump_num_relocations ();
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
for (scope = symbol_scope; *scope; ++scope)
|
||||
@ -303,7 +309,7 @@ _dl_lookup_symbol_skip (const char *undef_name,
|
||||
size_t i;
|
||||
int protected;
|
||||
|
||||
++_dl_num_relocations;
|
||||
bump_num_relocations ();
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
scope = symbol_scope;
|
||||
@ -374,7 +380,7 @@ _dl_lookup_versioned_symbol (const char *undef_name,
|
||||
struct r_scope_elem **scope;
|
||||
int protected;
|
||||
|
||||
++_dl_num_relocations;
|
||||
bump_num_relocations ();
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
for (scope = symbol_scope; *scope; ++scope)
|
||||
@ -493,7 +499,7 @@ _dl_lookup_versioned_symbol_skip (const char *undef_name,
|
||||
size_t i;
|
||||
int protected;
|
||||
|
||||
++_dl_num_relocations;
|
||||
bump_num_relocations ();
|
||||
|
||||
/* Search the relevant loaded objects for a definition. */
|
||||
scope = symbol_scope;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* Relocate a shared object and resolve its references to other loaded objects.
|
||||
Copyright (C) 1995,96,97,98,99,2000,2001 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995,96,97,98,99,2000,2001,2002 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
The GNU C Library is free software; you can redistribute it and/or
|
||||
@ -27,8 +27,13 @@
|
||||
#include <sys/types.h>
|
||||
#include "dynamic-link.h"
|
||||
|
||||
#ifdef SHARED
|
||||
/* Statistics function. */
|
||||
unsigned long int _dl_num_cache_relocations;
|
||||
# define bump_num_cache_relocations() ++_dl_num_cache_relocations
|
||||
#else
|
||||
# define bump_num_cache_relocations() 0
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
@ -113,7 +118,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
(ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
|
||||
? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
|
||||
&& elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
|
||||
? (++_dl_num_cache_relocations, \
|
||||
? (bump_num_cache_relocations, \
|
||||
(*ref) = l->l_lookup_cache.ret, \
|
||||
l->l_lookup_cache.value) \
|
||||
: ({ lookup_t _lr; \
|
||||
@ -133,7 +138,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
|
||||
(ELFW(ST_BIND) ((*ref)->st_info) != STB_LOCAL \
|
||||
? ((__builtin_expect ((*ref) == l->l_lookup_cache.sym, 0) \
|
||||
&& elf_machine_type_class (r_type) == l->l_lookup_cache.type_class) \
|
||||
? (++_dl_num_cache_relocations, \
|
||||
? (bump_num_cache_relocations, \
|
||||
(*ref) = l->l_lookup_cache.ret, \
|
||||
l->l_lookup_cache.value) \
|
||||
: ({ lookup_t _lr; \
|
||||
|
Loading…
x
Reference in New Issue
Block a user