summaryrefslogtreecommitdiff
path: root/libc/elf/preloadtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/elf/preloadtest.c')
-rw-r--r--libc/elf/preloadtest.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/libc/elf/preloadtest.c b/libc/elf/preloadtest.c
new file mode 100644
index 000000000..7ea10b9b5
--- /dev/null
+++ b/libc/elf/preloadtest.c
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+#include "testobj.h"
+
+int
+main (void)
+{
+ int res = preload (42);
+
+ printf ("preload (42) = %d, %s\n", res, res == 92 ? "ok" : "wrong");
+
+ return res != 92;
+}
+
+int
+foo (int a)
+{
+ return a;
+}