diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-10 04:01:36 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-10 04:01:36 +0000 |
commit | 8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51 (patch) | |
tree | de81e2ebf2b5b32510d511caa07c2496e3d540ba /elf/dl-deps.c | |
parent | f3863621f617b040c66d635109203c29f35f7331 (diff) | |
download | glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.zip glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.tar.gz glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.tar.bz2 |
Update.
2000-06-09 Ulrich Drepper <drepper@redhat.com>
Rewrite error message handling.
* elf/dl-deps.c (_dl_map_object_deps): Pass new parameter to
_dl_catch_error.
* elf/dl-error (struct catch): Add objname member.
(_dl_signal_error): Take new parameter with object name. When
passing message on simply store object name and duplicate error
message.
(_dl_catch_error): Take new parameter. Store object name in the
place pointed to.
* include/dlfcn.h: Adjust _dl_catch_error prototype.
* sysdeps/generic/ldsodefs.h: Adjust _dl_signal_error prototype.
* elf/dl-libc.c (dlerror_run): Pass new parameter to _dl_catch_error.
* elf/dl-open.c (_dl_open): Likewise.
* elf/rtld.c (dl_main): Likewise.
* elf/dl-close.c: Mark error messages with N_().
* elf/dl-deps.c: Likewise.
* elf/dl-error.c: Likewise.
* elf/dl-load.c: Likewise.
* elf/dl-open.c: Likewise.
* elf/dl-reloc.c: Likewise.
* elf/dl-support.c: Likewise.
* elf/dl-sym.c: Likewise.
* elf/dl-version.c: Likewise.
* elf/dl-lookup.c: Add comments about problems with error message
translations.
* elf/dl-reloc.c: Likewise.
* elf/dl-version.c: Likewise.
Diffstat (limited to 'elf/dl-deps.c')
-rw-r--r-- | elf/dl-deps.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/elf/dl-deps.c b/elf/dl-deps.c index 670b9df..7c7b4b6 100644 --- a/elf/dl-deps.c +++ b/elf/dl-deps.c @@ -20,6 +20,7 @@ #include <assert.h> #include <dlfcn.h> #include <errno.h> +#include <libintl.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -102,7 +103,7 @@ struct list /* DST must not appear in SUID/SGID programs. */ \ if (__libc_enable_secure) \ _dl_signal_error (0, __str, \ - "DST not allowed in SUID/SGID programs"); \ + N_("DST not allowed in SUID/SGID programs")); \ \ __newp = (char *) alloca (DL_DST_REQUIRED (l, __str, strlen (__str), \ __cnt)); \ @@ -114,8 +115,8 @@ struct list /* The replacement for the DST is not known. We can't \ processed. */ \ if (fatal) \ - _dl_signal_error (0, __str, \ - "empty dynamics string token substitution"); \ + _dl_signal_error (0, __str, N_("\ +empty dynamics string token substitution")); \ else \ { \ /* This is for DT_AUXILIARY. */ \ @@ -265,7 +266,8 @@ _dl_map_object_deps (struct link_map *map, } else if (d->d_tag == DT_AUXILIARY || d->d_tag == DT_FILTER) { - char *errstring; + const char *objname; + const char *errstring; struct list *newp; /* Object name. */ const char *name; @@ -289,11 +291,11 @@ _dl_map_object_deps (struct link_map *map, /* We must be prepared that the addressed shared object is not available. */ - if (_dl_catch_error (&errstring, openaux, &args)) + if (_dl_catch_error (&objname, &errstring, openaux, &args)) { /* We are not interested in the error message. */ assert (errstring != NULL); - free (errstring); + free ((char *) errstring); /* Simply ignore this error and continue the work. */ continue; @@ -452,7 +454,7 @@ _dl_map_object_deps (struct link_map *map, l->l_initfini = malloc (nneeded * sizeof needed[0]); if (l->l_initfini == NULL) _dl_signal_error (ENOMEM, map->l_name, - "cannot allocate dependency list"); + N_("cannot allocate dependency list")); memcpy (l->l_initfini, needed, nneeded * sizeof needed[0]); } @@ -470,7 +472,7 @@ _dl_map_object_deps (struct link_map *map, * sizeof (struct link_map *)); if (map->l_searchlist.r_list == NULL) _dl_signal_error (ENOMEM, map->l_name, - "cannot allocate symbol search list"); + N_("cannot allocate symbol search list")); map->l_searchlist.r_nlist = nlist; for (nlist = 0, runp = known; runp; runp = runp->unique) |