1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-12-24 17:51:17 +03:00
1999-08-01  Ulrich Drepper  <drepper@cygnus.com>

	* elf/dl-sym.c (_dl_sym): Always determine module of the caller to
	pass it to _dl_lookup_symbol.

	* elf/dl-error.c (_dl_signal_error): Optimize string generation a
	bit.  Reword message.

	* dlfcn/dlerror.c: Make code thread-safe.
This commit is contained in:
Ulrich Drepper
1999-08-01 19:24:38 +00:00
parent 7730a3b9d4
commit 4f2793d41f
4 changed files with 68 additions and 40 deletions

View File

@@ -1,5 +1,5 @@
/* Error handling for runtime dynamic linker.
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
@@ -75,12 +75,13 @@ _dl_signal_error (int errcode,
lcatch->errstring = malloc (objname_len + errstring_len);
if (lcatch->errstring != NULL)
{
char *cp = lcatch->errstring;
if (objname_len > 0)
{
memcpy (lcatch->errstring, objname, objname_len - 2);
memcpy (lcatch->errstring + objname_len - 2, ": ", 2);
cp = __mempcpy (cp, objname, objname_len - 2);
cp = __mempcpy (cp, ": ", 2);
}
memcpy (lcatch->errstring + objname_len, errstring, errstring_len);
memcpy (cp, errstring, errstring_len);
}
longjmp (lcatch->env, errcode ?: -1);
}
@@ -89,7 +90,7 @@ _dl_signal_error (int errcode,
/* Lossage while resolving the program's own symbols is always fatal. */
char buffer[1024];
_dl_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
": error in loading shared libraries: ",
": error while loading shared libraries: ",
objname ?: "", objname && *objname ? ": " : "",
errstring, errcode ? ": " : "",
(errcode