From 7982ecfe469a67ce5b249da9d6b24a8d6103fc6f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 7 Nov 2001 06:32:27 +0000 Subject: Update. * elf/dl-profile.c: Replace state variable with simple flag named running. Remove commented-out code. * elf/dl-reloc.c (_dl_relocate_object): Likewise. --- elf/dl-reloc.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'elf/dl-reloc.c') diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index 4ee0da0e9e..efdccea151 100644 --- a/elf/dl-reloc.c +++ b/elf/dl-reloc.c @@ -122,23 +122,30 @@ cannot make segment writable for relocation")); if (__builtin_expect (consider_profiling, 0)) { + const char *errstring = NULL; + /* Allocate the array which will contain the already found relocations. If the shared object lacks a PLT (for example if it only contains lead function) the l_info[DT_PLTRELSZ] will be NULL. */ if (l->l_info[DT_PLTRELSZ] == NULL) - _dl_fatal_printf ("%s: profiler found no PLTREL in object %s\n", - _dl_argv[0] ?: "", - l->l_name); + { + errstring = N_("%s: profiler found no PLTREL in object %s\n"); + fatal: + _dl_fatal_printf (errstring, + _dl_argv[0] ?: "", + l->l_name); + } l->l_reloc_result = (ElfW(Addr) *) calloc (sizeof (ElfW(Addr)), l->l_info[DT_PLTRELSZ]->d_un.d_val); if (l->l_reloc_result == NULL) - _dl_fatal_printf ("\ -%s: profiler out of memory shadowing PLTREL of %s\n", - _dl_argv[0] ?: "", - l->l_name); + { + errstring = N_("\ +%s: profiler out of memory shadowing PLTREL of %s\n"); + goto fatal; + } } } -- cgit v1.2.3