aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-20 04:18:25 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-20 04:18:25 +0000
commitea97f90c9a84ce5c8a7c60695f05adfd2b6bb295 (patch)
tree20512a2b25d3d501bbec025537775c17ff1feea1 /elf/dl-reloc.c
parent131bf9f38819194b24e44e333fe6c1c41b76b20e (diff)
downloadglibc-ea97f90c9a84ce5c8a7c60695f05adfd2b6bb295.zip
glibc-ea97f90c9a84ce5c8a7c60695f05adfd2b6bb295.tar.gz
glibc-ea97f90c9a84ce5c8a7c60695f05adfd2b6bb295.tar.bz2
Update.
2000-06-19 Ulrich Drepper <drepper@redhat.com> * elf/sprof.c (print_version): Update year. * elf/sprof.c (load_shobj): Don't always add load address to dynamic table entry values. Use D_PTR. * elf/dl-reloc.c (_dl_relocate_object): Don't start profiling weird binaries without PLT. Patches by James Mathiesen <james@curl.com>.
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 2806231..b389c42 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -94,13 +94,21 @@ cannot make segment writable for relocation"));
if (__builtin_expect (_dl_profile != NULL, 0))
{
/* Allocate the array which will contain the already found
- relocations. */
+ relocations. If the shared object lacks a PLT (for example
+ if it inly contains lead function) the l_info[DT_PLTRELSZ]
+ will be NULL. */
+ if (l->l_info[DT_PLTRELSZ] == NULL)
+ _dl_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
+ ": profiler found no PLTREL in object ",
+ l->l_name, "\n", NULL);
+
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_sysdep_fatal (_dl_argv[0] ?: "<program name unknown>",
- "cannot allocate memory for profiling", NULL);
+ ": profiler outof memory shadowing PLTREL of ",
+ l->l_name, "\n", NULL);
}
}