From 1618c590382ef16b1942bf39a42aa683a050ff57 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 4 Nov 1997 03:00:40 +0000 Subject: Update. 1997-11-04 Ulrich Drepper * manual/filesys.texi: Correct description of return value for readdir_r. * sysdeps/unix/readdir_r.c (__readdir_r): Return value of errno not -1 in error case. * sysdeps/generic/readdir_r.c (__readdir_r): Return ENOSYS not -1. Reported by Jim Meyering . 1997-11-02 Paul Eggert * strftime.c: Use host's underlying strftime to access locale-specific info. This is useful e.g. when building GNU Emacs under Solaris 2.6. (weekday_name, month_name): Omit if HAVE_STRFTIME. (my_strftime): New macro, which names the strftime function that this source file produces. (strftime): #undef if emacs is defined; this works around Emacs 20.2's method of compiling with -Dstrftime=emacs_strftime. Also, declare as a function returning size_t, for similar reasons. (my_strftime): If HAVE_STRFTIME, use underlying strftime to handle locale-dependent formats like %a and %Ec. 1997-11-02 Paul Eggert * strftime.c (memcpy_lowcase, memcpy_uppcase, strftime): Ensure that args to islower and isupper are valid unsigned chars, even if char is signed. 1997-11-04 Ulrich Drepper * assert/Makefile (headers): Add assert.h, necessary after patch to Makefiles. * ctype/Makefile (headers): Likewise. * pwd/Makefile (headers): Likewise. * grp/Makefile (headers): Likewise. Patch by NIIBE Yutaka . 1997-11-04 03:08 Ulrich Drepper * glibcbug.in: Add information about configured target. Patch by Zack Weinberg . * elf/dl-lookup.c (_dl_lookup_versioned_symbol): Be prepared for empty string as `reference_name' parameter. * elf/rtld.c: Don't set real program name in l_name of main object. * manual/creature.texi: Apply Paul Eggert's patch for better _POSIX_C_SOURCE description. * stdlib/strfmon.c: Fix numerous bugs in formatting. * time/strptime.c [%Y]: Treat all years, not only those which fit in time_t. [%Oy]: Really store value. Patches by Paul Eggert. * wcsmbs/wchar.h: Fix documentation bugs. Declare wcsdup only is __USE_GNU. 1997-11-03 02:48 Ulrich Drepper * sysdeps/generic/bits/errno.h: Remove all error definitions. This is only meant as a stub. 1997-10-31 Andreas Jaeger * sysdeps/standalone/bits/errno.h: Copied from sysdeps/generic/bits/errno.h and added all know error codes that are used in glibc. 1997-11-03 02:23 Ulrich Drepper * sysdeps/generic/make_siglist.c: Add comment to clarify use and make sure the correct _NSIG value is used. Patch by Klaus Espenlaub . 1997-11-03 00:20 Ulrich Drepper * intl/localealias.c (read_alias_file): Correct handling of line reader which sometimes skipped complete lines (PR 205). Optimize a bit by using mempcpy. 1997-11-02 16:59 Philipp Thomas * intl/localealias.c (read_alias_file): Correctly set map[].value instead of overwriting map[].alias 1997-11-02 15:32 Ulrich Drepper * libc.map: Add _IO_flockfile and _IO_funlockfile. Suggested by H.J. Lu . 1997-11-02 15:17 Ulrich Drepper * elf/dl-error.c (_dl_signal_error): Use _strerror_internal instead of strerror. * assert/assert-perr.c: Use _strerror_internal directly instead of __strerror_r. Suggested by Joe Keane . 1997-11-01 16:46 Zack Weinberg * configure.in: Check for gcc-2.7.2 -pipe bug and hack around it (PR 245). 1997-11-01 Paul Eggert * time/strptime.c (strptime_internal): Fix bug: %Oy forgot to assign tm_year. Do not restrict %Y to years less than 2037 even on 32-bit time_t hosts, as strptime returns an int tm_year, not a time_t, and it's possible for programs to use the year without having to use time_t. non-directories in the list (PR 203). --- elf/dl-error.c | 10 ++++++++-- elf/dl-lookup.c | 5 ++++- elf/rtld.c | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'elf') diff --git a/elf/dl-error.c b/elf/dl-error.c index 72af85985d..5e76d7d7d8 100644 --- a/elf/dl-error.c +++ b/elf/dl-error.c @@ -23,6 +23,9 @@ #include #include +/* This is the internal function we use to generate the error string. */ +extern char *_strerror_internal __P ((int, char *, size_t)); + /* This structure communicates state between _dl_catch_error and _dl_signal_error. */ struct catch @@ -74,11 +77,14 @@ _dl_signal_error (int errcode, { /* Lossage while resolving the program's own symbols is always fatal. */ extern char **_dl_argv; /* Set in rtld.c at startup. */ + char buffer[1024]; _dl_sysdep_fatal (_dl_argv[0] ?: "", ": error in loading shared libraries: ", objname ?: "", objname ? ": " : "", errstring, errcode ? ": " : "", - errcode ? strerror (errcode) : "", "\n", NULL); + (errcode + ? _strerror_internal (errcode, buffer, sizeof buffer) + : ""), "\n", NULL); } } @@ -93,7 +99,7 @@ _dl_catch_error (char **errstring, /* We need not handle `receiver' since setting a `catch' is handled before it. */ - /* Some systems (.e.g, SPARC) handle constructors to local variables + /* Some systems (e.g., SPARC) handle constructors to local variables inefficient. So we initialize `c' by hand. */ c.errstring = NULL; c.objname = NULL; diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c index 2ec7e3a446..ef344794c5 100644 --- a/elf/dl-lookup.c +++ b/elf/dl-lookup.c @@ -279,6 +279,7 @@ _dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref, const struct r_found_version *version, int reloc_type) { + extern char **_dl_argv; const unsigned long int hash = _dl_elf_hash (undef_name); struct sym_val current_value = { 0, NULL }; struct link_map **scope; @@ -295,7 +296,9 @@ _dl_lookup_versioned_symbol (const char *undef_name, const ElfW(Sym) **ref, if (res < 0) /* Oh, oh. The file named in the relocation entry does not contain the needed symbol. */ - _dl_signal_error (0, reference_name, + _dl_signal_error (0, (*reference_name + ? reference_name + : (_dl_argv[0] ?: "
")), make_string ("symbol ", undef_name, ", version ", version->name, " not defined in file ", diff --git a/elf/rtld.c b/elf/rtld.c index 48d8575c89..b1538aa893 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -395,8 +395,7 @@ of this helper program; chances are you did not intend to run this program.\n", { /* Create a link_map for the executable itself. This will be what dlopen on "" returns. */ - main_map = _dl_new_object (_dl_argv[0] ?: (char *) "
", - "", lt_executable); + main_map = _dl_new_object ((char *) "", "", lt_executable); if (main_map == NULL) _dl_sysdep_fatal ("cannot allocate memory for link map\n", NULL); main_map->l_phdr = phdr; -- cgit v1.2.3