aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-lookup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-03 00:31:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-03 00:31:37 +0000
commit7969407a01a108298ea506e0c37c1d6b7c9d424c (patch)
tree3c4f570e330a91ce712a574ee2d7ea1e9476c397 /elf/dl-lookup.c
parent88794e308552d6051453544f8790986314fd9e1c (diff)
downloadglibc-7969407a01a108298ea506e0c37c1d6b7c9d424c.zip
glibc-7969407a01a108298ea506e0c37c1d6b7c9d424c.tar.gz
glibc-7969407a01a108298ea506e0c37c1d6b7c9d424c.tar.bz2
Update.
Change ld.so to not use functions which are exported. One cannot interpose them anyway. Use INT() to mark uses, INTDEF() to mark definitions. * include/libc-symbols.h: Define INT and INTDEF. * sysdeps/generic/ldsodefs.h: Declare _dl_debug_printf_internal, _dl_signal_error_internal, _dl_map_object_internal, _dl_map_object_deps_internal, _dl_lookup_symbol_internal, _dl_lookup_versioned_symbol_internal, _dl_relocate_object_internal, _dl_debug_state_internal, _dl_start_profile_internal, and _dl_unload_cache_internal. * include/dlfcn.h: Declare _dl_catch_error_internal. * elf/rtld.c: Use INT for calls to any of the *_internal functions above. Add INTDEF to function definitions. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-misc.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/alpha/dl-machine.h (RTLD_START): Call _dl_init_internal instead of _dl_init. * sysdeps/arm/dl-machine.h: Likewise. * sysdeps/cris/dl-machine.h: Likewise. * sysdeps/hppa/dl-machine.h: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/m68k/dl-machine.h: Likewise. * sysdeps/mips/dl-machine.h: Likewise. * sysdeps/mips/mips64/dl-machine.h: Likewise. * sysdeps/s390/s390-32/dl-machine.h: Likewise. * sysdeps/s390/s390-64/dl-machine.h: Likewise. * sysdeps/sh/dl-machine.h: Likewise. * sysdeps/sparc/sparc32/dl-machine.h: Likewise. * sysdeps/sparc/sparc64/dl-machine.h: Likewise. * sysdeps/x86_64/dl-machine.h: Likewise. * sysdeps/powerpc/dl-start.S (_dl_start_user): Likewise. * elf/Versions: Don't export _dl_check_all_versions, _dl_sysdep_start, and _dl_debug_initialize.
Diffstat (limited to 'elf/dl-lookup.c')
-rw-r--r--elf/dl-lookup.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 4f3285f..49ee42a 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -168,11 +168,11 @@ add_dependency (struct link_map *undef_map, struct link_map *map)
/* Display information if we are debugging. */
if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_FILES, 0))
- _dl_debug_printf ("\
+ INT(_dl_debug_printf) ("\
\nfile=%s; needed by %s (relocation dependency)\n\n",
- map->l_name[0] ? map->l_name : _dl_argv[0],
- undef_map->l_name[0]
- ? undef_map->l_name : _dl_argv[0]);
+ map->l_name[0] ? map->l_name : _dl_argv[0],
+ undef_map->l_name[0]
+ ? undef_map->l_name : _dl_argv[0]);
}
else
/* Whoa, that was bad luck. We have to search again. */
@@ -203,8 +203,9 @@ static void
internal_function
_dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
const ElfW(Sym) **ref, struct r_scope_elem *symbol_scope[],
- struct sym_val *value, const struct r_found_version *version,
- int type_class, int protected);
+ struct sym_val *value,
+ const struct r_found_version *version, int type_class,
+ int protected);
/* Search loaded objects' symbol tables for a definition of the symbol
UNDEF_NAME. */
@@ -239,8 +240,8 @@ _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
&& add_dependency (undef_map, current_value.m) < 0)
/* Something went wrong. Perhaps the object we tried to reference
was just removed. Try finding another definition. */
- return _dl_lookup_symbol (undef_name, undef_map, ref, symbol_scope,
- type_class, 0);
+ return INT(_dl_lookup_symbol) (undef_name, undef_map, ref,
+ symbol_scope, type_class, 0);
break;
}
@@ -288,6 +289,7 @@ _dl_lookup_symbol (const char *undef_name, struct link_map *undef_map,
*ref = current_value.s;
return LOOKUP_VALUE (current_value.m);
}
+INTDEF (_dl_lookup_symbol)
/* This function is nearly the same as `_dl_lookup_symbol' but it
@@ -400,9 +402,9 @@ _dl_lookup_versioned_symbol (const char *undef_name,
&& add_dependency (undef_map, current_value.m) < 0)
/* Something went wrong. Perhaps the object we tried to reference
was just removed. Try finding another definition. */
- return _dl_lookup_versioned_symbol (undef_name, undef_map, ref,
- symbol_scope, version,
- type_class, 0);
+ return INT(_dl_lookup_versioned_symbol) (undef_name, undef_map,
+ ref, symbol_scope,
+ version, type_class, 0);
break;
}
@@ -478,6 +480,7 @@ _dl_lookup_versioned_symbol (const char *undef_name,
*ref = current_value.s;
return LOOKUP_VALUE (current_value.m);
}
+INTDEF (_dl_lookup_versioned_symbol)
/* Similar to _dl_lookup_symbol_skip but takes an additional argument
@@ -597,12 +600,14 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
if (GL(dl_debug_mask) & DL_DEBUG_BINDINGS)
{
- _dl_debug_printf ("binding file %s to %s: %s symbol `%s'",
- (reference_name[0]
- ? reference_name : (_dl_argv[0] ?: "<main program>")),
- value->m->l_name[0] ? value->m->l_name : _dl_argv[0],
- protected ? "protected" : "normal",
- undef_name);
+ INT(_dl_debug_printf) ("binding file %s to %s: %s symbol `%s'",
+ (reference_name[0]
+ ? reference_name
+ : (_dl_argv[0] ?: "<main program>")),
+ value->m->l_name[0]
+ ? value->m->l_name : _dl_argv[0],
+ protected ? "protected" : "normal",
+ undef_name);
if (version)
_dl_debug_printf_c (" [%s]\n", version->name);
else