aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-10 04:01:36 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-10 04:01:36 +0000
commit8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51 (patch)
treede81e2ebf2b5b32510d511caa07c2496e3d540ba /elf/dl-reloc.c
parentf3863621f617b040c66d635109203c29f35f7331 (diff)
downloadglibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.tar
glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.tar.gz
glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.tar.bz2
glibc-8e17ea58173d35e2e5dabfeb9fa5abf2609cfc51.zip
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-reloc.c')
-rw-r--r--elf/dl-reloc.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 50bc8e886f..280623153a 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -18,6 +18,7 @@
Boston, MA 02111-1307, USA. */
#include <errno.h>
+#include <libintl.h>
#include <stdlib.h>
#include <unistd.h>
#include <ldsodefs.h>
@@ -58,8 +59,8 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
& ~(_dl_pagesize - 1)));
if (__mprotect (mapstart, mapend - mapstart,
PROT_READ|PROT_WRITE) < 0)
- _dl_signal_error (errno, l->l_name,
- "cannot make segment writable for relocation");
+ _dl_signal_error (errno, l->l_name, N_("\
+cannot make segment writable for relocation"));
}
}
@@ -138,7 +139,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
if (__mprotect (mapstart, mapend - mapstart, prot) < 0)
_dl_signal_error (errno, l->l_name,
- "can't restore segment prot after reloc");
+ N_("can't restore segment prot after reloc"));
#ifdef CLEAR_CACHE
CLEAR_CACHE (mapstart, mapend);
@@ -157,14 +158,16 @@ _dl_reloc_bad_type (struct link_map *map, uint_fast8_t type, int plt)
extern const char _itoa_lower_digits[];
if (plt)
{
- char msg[] = "unexpected PLT reloc type 0x??";
+ /* XXX We cannot translate the message. */
+ static char msg[] = "unexpected PLT reloc type 0x??";
msg[sizeof msg - 3] = DIGIT(type >> 4);
msg[sizeof msg - 2] = DIGIT(type);
_dl_signal_error (0, map->l_name, msg);
}
else
{
- char msg[] = "unexpected reloc type 0x??";
+ /* XXX We cannot translate the message. */
+ static char msg[] = "unexpected reloc type 0x??";
msg[sizeof msg - 3] = DIGIT(type >> 4);
msg[sizeof msg - 2] = DIGIT(type);
_dl_signal_error (0, map->l_name, msg);