summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2010-06-27 17:42:24 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2010-06-27 17:42:24 +0000
commit3249f0965fee5ecd600f675c344c87bda1727da4 (patch)
tree0470d330d75e75fe23e9afd46d7bd89366f85c2f
parenta4acba7cb82e16ac9f796b70673af9df30cc33f6 (diff)
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");