From 504d9a68b311a947544b1c2684b9730c2a9f4ee6 Mon Sep 17 00:00:00 2001 From: cognet Date: Tue, 28 Sep 2004 14:43:12 +0000 Subject: Don't try to relocate the dynamic loader in reloc_non_plt(). It has already been done before. --- libexec/rtld-elf/arm/reloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libexec/rtld-elf/arm') diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c index 6dd8ad0..ff9d195 100644 --- a/libexec/rtld-elf/arm/reloc.c +++ b/libexec/rtld-elf/arm/reloc.c @@ -246,10 +246,13 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) int bytes = obj->nchains * sizeof(SymCache); int r = -1; + /* The relocation for the dynamic loader has already been done. */ + if (obj == obj_rtld) + return (0); /* * The dynamic loader may be called from a thread, we have * limited amounts of stack available so we cannot use alloca(). - * */ + */ cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; -- cgit v1.1