summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2010-06-27 17:42:23 +0000
committerart <art@openbsd.org>2010-06-27 17:42:23 +0000
commitc2765e3889567d3950c589d6bf99579f0b73d44a (patch)
tree205d4983d4e989382abd98b151cde1dc02b499a0
parentClear ACPI fixed event status on resume (power buttons/etc) so that some (diff)
downloadwireguard-openbsd-c2765e3889567d3950c589d6bf99579f0b73d44a.tar.xz
wireguard-openbsd-c2765e3889567d3950c589d6bf99579f0b73d44a.zip
GCC is being intelligent with our asm statements that were used to pad stuff
before and after a function. We made the assumption that the function would not be rearranged but would stay between our paddings. Haha, trusting gcc to not rearrange things, we've never had problems with that.
-rw-r--r--regress/sys/kern/noexec/noexec.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/regress/sys/kern/noexec/noexec.c b/regress/sys/kern/noexec/noexec.c
index f2055de76ff..d4d5570a122 100644
--- a/regress/sys/kern/noexec/noexec.c
+++ b/regress/sys/kern/noexec/noexec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: noexec.c,v 1.10 2007/12/27 17:56:44 deraadt Exp $ */
+/* $OpenBSD: noexec.c,v 1.11 2010/06/27 17:42:23 art Exp $ */
/*
* Copyright (c) 2002,2003 Michael Shalayeff
@@ -273,11 +273,4 @@ main(int argc, char *argv[])
exit((*func)(p, size));
}
-__asm (".space 8192");
-
-void
-testfly(void)
-{
-}
-
-__asm (".space 8192");
+__asm (".space 8192; .globl testfly; .type testfly, @function; testfly: ret ;.space 8192");