diff --git a/libexec/rtld-elf/alpha/reloc.c b/libexec/rtld-elf/alpha/reloc.c index c1a71cf94647..535419cd24d0 100644 --- a/libexec/rtld-elf/alpha/reloc.c +++ b/libexec/rtld-elf/alpha/reloc.c @@ -162,8 +162,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; - if (cache != NULL) - memset(cache, 0, bytes); /* Perform relocations without addend if there are any: */ rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize); diff --git a/libexec/rtld-elf/amd64/reloc.c b/libexec/rtld-elf/amd64/reloc.c index f8457b313944..67785748bff5 100644 --- a/libexec/rtld-elf/amd64/reloc.c +++ b/libexec/rtld-elf/amd64/reloc.c @@ -125,8 +125,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; - if (cache != NULL) - memset(cache, 0, bytes); rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize); for (rel = obj->rel; rel < rellim; rel++) { diff --git a/libexec/rtld-elf/i386/reloc.c b/libexec/rtld-elf/i386/reloc.c index f8457b313944..67785748bff5 100644 --- a/libexec/rtld-elf/i386/reloc.c +++ b/libexec/rtld-elf/i386/reloc.c @@ -125,8 +125,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; - if (cache != NULL) - memset(cache, 0, bytes); rellim = (const Elf_Rel *) ((caddr_t) obj->rel + obj->relsize); for (rel = obj->rel; rel < rellim; rel++) { diff --git a/libexec/rtld-elf/ia64/reloc.c b/libexec/rtld-elf/ia64/reloc.c index be846c1134bf..8c63073aabb7 100644 --- a/libexec/rtld-elf/ia64/reloc.c +++ b/libexec/rtld-elf/ia64/reloc.c @@ -231,8 +231,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; - if (cache != NULL) - memset(cache, 0, bytes); /* * When relocating rtld itself, we need to avoid using malloc. diff --git a/libexec/rtld-elf/powerpc/reloc.c b/libexec/rtld-elf/powerpc/reloc.c index 22613a03012c..038460002cbd 100644 --- a/libexec/rtld-elf/powerpc/reloc.c +++ b/libexec/rtld-elf/powerpc/reloc.c @@ -233,12 +233,8 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) * 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 (cache == MAP_FAILED) cache = NULL; - } - if (cache != NULL) { - memset(cache, 0, obj->nchains * sizeof(SymCache)); - } /* * From the SVR4 PPC ABI: diff --git a/libexec/rtld-elf/sparc64/reloc.c b/libexec/rtld-elf/sparc64/reloc.c index e4c78b6d8225..5808fd3a1eeb 100644 --- a/libexec/rtld-elf/sparc64/reloc.c +++ b/libexec/rtld-elf/sparc64/reloc.c @@ -261,8 +261,6 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry *obj_rtld) cache = mmap(NULL, bytes, PROT_READ|PROT_WRITE, MAP_ANON, -1, 0); if (cache == MAP_FAILED) cache = NULL; - if (cache != NULL) - memset(cache, 0, obj->nchains * sizeof(SymCache)); relalim = (const Elf_Rela *)((caddr_t)obj->rela + obj->relasize); for (rela = obj->rela; rela < relalim; rela++) {