aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-deps.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-deps.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-deps.c')
-rw-r--r--elf/dl-deps.c68
1 files changed, 35 insertions, 33 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 368ad2d..43a0bd8 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -59,10 +59,10 @@ openaux (void *a)
{
struct openaux_args *args = (struct openaux_args *) a;
- args->aux = _dl_map_object (args->map, args->name, 0,
- (args->map->l_type == lt_executable
- ? lt_library : args->map->l_type),
- args->trace_mode, 0);
+ args->aux = INT(_dl_map_object) (args->map, args->name, 0,
+ (args->map->l_type == lt_executable
+ ? lt_library : args->map->l_type),
+ args->trace_mode, 0);
}
static ptrdiff_t
@@ -107,28 +107,28 @@ struct list
\
/* DST must not appear in SUID/SGID programs. */ \
if (__libc_enable_secure) \
- _dl_signal_error (0, __str, NULL, \
- N_("DST not allowed in SUID/SGID programs")); \
+ INT(_dl_signal_error) (0, __str, NULL, \
+ N_("DST not allowed in SUID/SGID programs"));\
\
__newp = (char *) alloca (DL_DST_REQUIRED (l, __str, strlen (__str), \
__cnt)); \
\
- __result = DL_DST_SUBSTITUTE (l, __str, __newp, 0); \
+ __result = INT(_dl_dst_substitute) (l, __str, __newp, 0); \
\
if (*__result == '\0') \
{ \
/* The replacement for the DST is not known. We can't \
processed. */ \
if (fatal) \
- _dl_signal_error (0, __str, NULL, N_("\
+ INT(_dl_signal_error) (0, __str, NULL, N_("\
empty dynamics string token substitution")); \
else \
{ \
/* This is for DT_AUXILIARY. */ \
if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS, 0)) \
- _dl_debug_printf ("cannot load auxiliary `%s' because of" \
- "empty dynamic string token " \
- "substitution\n", __str); \
+ INT(_dl_debug_printf) (N_("\
+cannot load auxiliary `%s' because of empty dynamic string token " \
+ "substitution\n"), __str); \
continue; \
} \
} \
@@ -239,7 +239,8 @@ _dl_map_object_deps (struct link_map *map,
/* Store the tag in the argument structure. */
args.name = name;
- err = _dl_catch_error (&objname, &errstring, openaux, &args);
+ err = INT(_dl_catch_error) (&objname, &errstring, openaux,
+ &args);
if (__builtin_expect (errstring != NULL, 0))
{
if (err)
@@ -290,15 +291,15 @@ _dl_map_object_deps (struct link_map *map,
/* Say that we are about to load an auxiliary library. */
if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS,
0))
- _dl_debug_printf ("load auxiliary object=%s"
- " requested by file=%s\n", name,
- l->l_name[0]
- ? l->l_name : _dl_argv[0]);
+ INT(_dl_debug_printf) ("load auxiliary object=%s"
+ " requested by file=%s\n", name,
+ l->l_name[0]
+ ? l->l_name : _dl_argv[0]);
/* We must be prepared that the addressed shared
object is not available. */
- err = _dl_catch_error (&objname, &errstring, openaux,
- &args);
+ err = INT(_dl_catch_error) (&objname, &errstring, openaux,
+ &args);
if (__builtin_expect (errstring != NULL, 0))
{
/* We are not interested in the error message. */
@@ -317,14 +318,14 @@ _dl_map_object_deps (struct link_map *map,
/* Say that we are about to load an auxiliary library. */
if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_LIBS,
0))
- _dl_debug_printf ("load filtered object=%s"
- " requested by file=%s\n", name,
- l->l_name[0]
- ? l->l_name : _dl_argv[0]);
+ INT(_dl_debug_printf) ("load filtered object=%s"
+ " requested by file=%s\n", name,
+ l->l_name[0]
+ ? l->l_name : _dl_argv[0]);
/* For filter objects the dependency must be available. */
- err = _dl_catch_error (&objname, &errstring, openaux,
- &args);
+ err = INT(_dl_catch_error) (&objname, &errstring, openaux,
+ &args);
if (__builtin_expect (errstring != NULL, 0))
{
if (err)
@@ -452,8 +453,8 @@ _dl_map_object_deps (struct link_map *map,
l->l_initfini = (struct link_map **)
malloc ((nneeded + 1) * sizeof needed[0]);
if (l->l_initfini == NULL)
- _dl_signal_error (ENOMEM, map->l_name, NULL,
- N_("cannot allocate dependency list"));
+ INT(_dl_signal_error) (ENOMEM, map->l_name, NULL,
+ N_("cannot allocate dependency list"));
l->l_initfini[0] = l;
memcpy (&l->l_initfini[1], needed, nneeded * sizeof needed[0]);
}
@@ -483,8 +484,8 @@ _dl_map_object_deps (struct link_map *map,
(struct link_map **) malloc ((2 * nlist + 1)
* sizeof (struct link_map *));
if (map->l_initfini == NULL)
- _dl_signal_error (ENOMEM, map->l_name, NULL,
- N_("cannot allocate symbol search list"));
+ INT(_dl_signal_error) (ENOMEM, map->l_name, NULL,
+ N_("cannot allocate symbol search list"));
map->l_searchlist.r_list = &map->l_initfini[nlist + 1];
@@ -524,7 +525,7 @@ _dl_map_object_deps (struct link_map *map,
/* As current DT_AUXILIARY/DT_FILTER implementation needs to be
rewritten, no need to bother with prelinking the old
implementation. */
- _dl_signal_error (EINVAL, l->l_name, NULL, N_("\
+ INT(_dl_signal_error) (EINVAL, l->l_name, NULL, N_("\
Filters not supported with LD_TRACE_PRELINKING"));
}
@@ -538,8 +539,8 @@ Filters not supported with LD_TRACE_PRELINKING"));
+ (cnt
* sizeof (struct link_map *)));
if (l->l_local_scope[0] == NULL)
- _dl_signal_error (ENOMEM, map->l_name, NULL,
- N_("cannot allocate symbol search list"));
+ INT(_dl_signal_error) (ENOMEM, map->l_name, NULL,
+ N_("cannot allocate symbol search list"));
l->l_local_scope[0]->r_nlist = cnt;
l->l_local_scope[0]->r_list =
(struct link_map **) (l->l_local_scope[0] + 1);
@@ -618,6 +619,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
map->l_initfini[nlist] = NULL;
if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason,
- objname, NULL, errstring);
+ INT(_dl_signal_error) (errno_reason == -1 ? 0 : errno_reason, objname,
+ NULL, errstring);
}
+INTDEF (_dl_map_object_deps)