/* Run-time dynamic linker data structures for loaded ELF shared objects.
- Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998, 1999 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
extern void _dl_signal_error (int errcode,
const char *object,
const char *errstring)
+ internal_function
+ __attribute__ ((__noreturn__));
+
+/* Like _dl_signal_error, but may return when called in the context of
+ _dl_receive_error. */
+extern void _dl_signal_cerror (int errcode,
+ const char *object,
+ const char *errstring)
internal_function;
/* Call OPERATE, catching errors from `dl_signal_error'. If there is no
void *args)
internal_function;
-/* Call OPERATE, receiving errors from `dl_signal_error'. Unlike
+/* Call OPERATE, receiving errors from `dl_signal_cerror'. Unlike
`_dl_catch_error' the operation is resumed after the OPERATE
function returns.
ARGS is passed as argument to OPERATE. */
MAP->l_searchlist. PRELOADS points to a vector of NPRELOADS previously
loaded objects that will be inserted into MAP->l_searchlist after MAP
but before its dependencies. */
-extern void _dl_map_object_deps (struct link_map *map,
- struct link_map **preloads,
- unsigned int npreloads, int trace_mode)
+extern unsigned int _dl_map_object_deps (struct link_map *map,
+ struct link_map **preloads,
+ unsigned int npreloads,
+ int trace_mode, int global_scope)
internal_function;
/* Cache the locations of MAP's hash table. */
/* Open the shared object NAME, relocate it, and run its initializer if it
hasn't already been run. MODE is as for `dlopen' (see <dlfcn.h>). If
the object is already opened, returns its existing map. */
-extern struct link_map *_dl_open (const char *name, int mode)
+extern struct link_map *_dl_open (const char *name, int mode,
+ const void *caller)
internal_function;
/* Close an object previously opened by _dl_open. */
extern struct r_scope_elem *_dl_global_scope[2];
/* Direct pointer to the searchlist of the main object. */
extern struct r_scope_elem *_dl_main_searchlist;
+/* Copy of the content of `_dl_main_searchlist'. */
+extern struct r_scope_elem _dl_initial_searchlist;
+/* This is zero at program start to signal that the global scope map is
+ allocated by rtld. Later it keeps the size of the map. It might be
+ reset if in _dl_close if the last global object is removed. */
+extern size_t _dl_global_scope_alloc;
/* Allocate a `struct link_map' for a new object being loaded,
and enter it into the _dl_main_map list. */