summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/csu/boot.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/csu/boot.h b/lib/csu/boot.h
index a4867b3035f..66d12e808f0 100644
--- a/lib/csu/boot.h
+++ b/lib/csu/boot.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: boot.h,v 1.14 2015/12/06 23:36:12 guenther Exp $ */
+/* $OpenBSD: boot.h,v 1.15 2016/03/12 23:28:47 guenther Exp $ */
/*
* Copyright (c) 1998 Per Fogelstrom, Opsycon AB
@@ -50,6 +50,13 @@
#include "stdlib.h"
#include "dl_prebind.h"
+/*
+ * Use the internal, hidden name for any syscalls we need, to avoid
+ * accidental override by application code
+ */
+#define REDIRECT_SYSCALL(x) typeof(x) x asm("_libc_"#x) __dso_hidden
+REDIRECT_SYSCALL(mprotect);
+
#ifdef RCRT0
#define DT_PROC(n) ((n) - DT_LOPROC)