summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-12-29 20:18:21 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-12-29 20:18:21 +0000
commit71227a16882b248cd1da8d433afd6b9d5c2c3a7a (patch)
treec1e61ad9821c9592fa9805033cc8259a8f59fa48 /lib
parent20f7821d956664e236bf933bc1054c807f78a3cf (diff)
Make the PLT read-only on powerpc as well.
ok kurt@
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/boot.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/csu/boot.h b/lib/csu/boot.h
index 4120d54adb4..7ccfab59425 100644
--- a/lib/csu/boot.h
+++ b/lib/csu/boot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.h,v 1.8 2014/12/27 13:17:51 kettenis Exp $ */
+/* $OpenBSD: boot.h,v 1.9 2014/12/29 20:18:20 kettenis Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -283,7 +283,7 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp)
else
pagesize = 4096;
-#if defined(__alpha__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__powerpc__) || defined(__sparc64__)
start = ELF_TRUNC((Elf_Addr)__plt_start, pagesize);
size = ELF_ROUND((Elf_Addr)__plt_end - start, pagesize);
mprotect((void *)start, size, PROT_READ);