diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2007-07-15 22:52:15 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2007-07-15 22:52:15 +0000 |
| commit | 99227f1ec435d520c2350883a07acc98e248fc7d (patch) | |
| tree | 4e2b7a9ef626dd78de7ac32e7e37c0b4383def00 /libexec | |
| parent | 88cc6a490caa98e40f92c041e7b1a1e87fbd1669 (diff) | |
Notes
Diffstat (limited to 'libexec')
| -rw-r--r-- | libexec/rtld-elf/powerpc/reloc.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 94606ec4c9b75..ed3b6fab6e4a5 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -286,8 +286,12 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) * 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) + if (obj != obj_rtld) { + cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, + -1, 0); + if (cache == MAP_FAILED) + cache = NULL; + } else cache = NULL; /* |
