summaryrefslogtreecommitdiff
path: root/lib/csu/boot.h
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-07-03 11:17:26 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-07-03 11:17:26 +0000
commit80d1c4c828ade502b486a7c3e93b315afbfc4cd8 (patch)
tree79a9b224a4f442928d9b63e9343e43ca964267cf /lib/csu/boot.h
parentc1ec7d035d6797ad2175ee777cc9bbf1833ac661 (diff)
static pie support for sparc.
Diffstat (limited to 'lib/csu/boot.h')
-rw-r--r--lib/csu/boot.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/csu/boot.h b/lib/csu/boot.h
index a76481b6946..fec41e3971b 100644
--- a/lib/csu/boot.h
+++ b/lib/csu/boot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.h,v 1.10 2015/01/16 06:47:03 deraadt Exp $ */
+/* $OpenBSD: boot.h,v 1.11 2015/07/03 11:17:25 miod Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -282,7 +282,8 @@ _dl_boot_bind(const long sp, long *dl_data, Elf_Dyn *dynamicp)
else
pagesize = 4096;
-#if defined(__alpha__) || defined(__powerpc__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__powerpc__) || defined(__sparc__) || \
+ 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);