summaryrefslogtreecommitdiff
path: root/elf/dl-error.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-01 19:24:38 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-01 19:24:38 +0000
commit4f2793d41f1043cf04f6761b1da00d8741824087 (patch)
tree4438801b2a8444e7c83b62c3bd64ae833dc63ee1 /elf/dl-error.c
parent7730a3b9d420136fc8a001d1ebd6c68cd0c005a3 (diff)
downloadglibc-4f2793d41f1043cf04f6761b1da00d8741824087.tar.gz
Update.
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.
Diffstat (limited to 'elf/dl-error.c')
-rw-r--r--elf/dl-error.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/elf/dl-error.c b/elf/dl-error.c
index e802c27763..eda2725c5f 100644
--- a/elf/dl-error.c
+++ b/elf/dl-error.c
@@ -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