summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-02-24 10:16:59 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-02-24 10:16:59 +0000
commit6d9b0afbb35da4c87bd9fceca27287e90385de51 (patch)
tree5da5b26e5dd03b08d885823ef9c09904745392d8
parent71f8e3986f556e6acd957d471498fbfbcc97a3d8 (diff)
Use rounded down address when changing memory protections on the GOT, such
that we don't accidentally touch the page after the GOT. ok drahn@
-rw-r--r--libexec/ld.so/sparc64/rtld_machine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/sparc64/rtld_machine.c b/libexec/ld.so/sparc64/rtld_machine.c
index ff5bd712575..5693f9ce807 100644
--- a/libexec/ld.so/sparc64/rtld_machine.c
+++ b/libexec/ld.so/sparc64/rtld_machine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld_machine.c,v 1.40 2007/11/27 16:42:19 miod Exp $ */
+/* $OpenBSD: rtld_machine.c,v 1.41 2008/02/24 10:16:58 kettenis Exp $ */
/*
* Copyright (c) 1999 Dale Rahn
@@ -749,7 +749,7 @@ _dl_md_reloc_got(elf_object_t *object, int lazy)
pltgot[8] = (Elf_Addr)object;
}
if (object->got_size != 0)
- _dl_mprotect((void*)object->got_addr, object->got_size,
+ _dl_mprotect((void*)object->got_start, object->got_size,
PROT_READ);
if (object->plt_size != 0)
_dl_mprotect((void*)object->plt_start, object->plt_size,