aboutsummaryrefslogtreecommitdiff
path: root/elf/tst-execstack-mod.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tst-execstack-mod.c')
-rw-r--r--elf/tst-execstack-mod.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/elf/tst-execstack-mod.c b/elf/tst-execstack-mod.c
deleted file mode 100644
index 038e6550b5..0000000000
--- a/elf/tst-execstack-mod.c
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Test module for making nonexecutable stacks executable
- on load of a DSO that requires executable stacks. */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-void callme (void (*callback) (void));
-
-/* This is a function that makes use of executable stack by
- using a local function trampoline. */
-void
-tryme (void)
-{
- bool ok = false;
- void callback (void) { ok = true; }
-
- callme (&callback);
-
- if (ok)
- printf ("DSO called ok (local %p, trampoline %p)\n", &ok, &callback);
- else
- abort ();
-}
-
-void
-callme (void (*callback) (void))
-{
- (*callback) ();
-}