1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
* elf/dl-deps.c (struct openaux_args): Add open_mode element.
	(openaux): Pass open_mode as new last argument to _dl_map_object.
	(_dl_map_object_deps): Add new argument open_mode.  Initialize
	open_mode element of args variable with it.
	* elf/dl-open.c (dl_open_worker): Pass __RTLD_DLOPEN flag is set to
	_dl_map_object_deps.
	* elf/rtld.c (dl_main): Add zero as last parameter to
	_dl_map_object_deps call.
	* sysdeps/generic/ldsodefs.h: Adjust prototype of _dl_map_object_deps.
	* elf/nodlopen2.c: New file.
	* elf/nodlopenmod2.c: New file.
	* elf/Makefile: Add rules to build and run nodlopen2.

	* elf/tls-macros.hgg: ...here.  New file.
2002-02-08  Richard Henderson  <rth@redhat.com>
This commit is contained in:
Ulrich Drepper
2002-02-10 22:40:17 +00:00
parent 2cef4257d0
commit 87837aace9
8 changed files with 72 additions and 26 deletions

View File

@ -158,7 +158,7 @@ dl_open_worker (void *a)
/* Maybe we have to expand a DST. */
dst = strchr (file, '$');
if (dst != NULL)
if (__builtin_expect (dst != NULL, 0))
{
const void *caller = args->caller;
size_t len = strlen (file);
@ -208,8 +208,7 @@ dl_open_worker (void *a)
}
/* Load the named object. */
args->map = new = _dl_map_object (NULL, file, 0, lt_loaded, 0,
mode);
args->map = new = _dl_map_object (NULL, file, 0, lt_loaded, 0, mode);
/* If the pointer returned is NULL this means the RTLD_NOLOAD flag is
set and the object is not already loaded. */
@ -243,7 +242,7 @@ dl_open_worker (void *a)
}
/* Load that object's dependencies. */
_dl_map_object_deps (new, NULL, 0, 0);
_dl_map_object_deps (new, NULL, 0, 0, mode & __RTLD_DLOPEN);
/* So far, so good. Now check the versions. */
for (i = 0; i < new->l_searchlist.r_nlist; ++i)
@ -413,7 +412,7 @@ _dl_open (const char *file, int mode, const void *caller)
/* Release the lock. */
__libc_lock_unlock_recursive (GL(dl_load_lock));
if (errstring)
if (__builtin_expect (errstring != NULL, 0))
{
/* Some error occurred during loading. */
char *local_errstring;