Test module for ELF dynamic loading test suite.
authordrepper <drepper>
Wed, 20 Jan 1999 00:33:09 +0000 (00:33 +0000)
committerdrepper <drepper>
Wed, 20 Jan 1999 00:33:09 +0000 (00:33 +0000)
elf/testobj4.c [new file with mode: 0644]
elf/testobj5.c [new file with mode: 0644]
elf/testobj6.c [new file with mode: 0644]

diff --git a/elf/testobj4.c b/elf/testobj4.c
new file mode 100644 (file)
index 0000000..38905c8
--- /dev/null
@@ -0,0 +1,22 @@
+#include <dlfcn.h>
+
+int
+obj4func1 (int a __attribute__ ((unused)))
+{
+  return 55;
+}
+
+int
+obj4func2 (int a)
+{
+  return foo (a) + 43;
+}
+
+int
+preload (int a)
+{
+  int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
+  if (fp != NULL)
+    return fp (a) + 10;
+  return 10;
+}
diff --git a/elf/testobj5.c b/elf/testobj5.c
new file mode 100644 (file)
index 0000000..0a2bbe0
--- /dev/null
@@ -0,0 +1,22 @@
+#include <dlfcn.h>
+
+int
+obj5func1 (int a __attribute__ ((unused)))
+{
+  return 66;
+}
+
+int
+obj5func2 (int a)
+{
+  return foo (a) + 44;
+}
+
+int
+preload (int a)
+{
+  int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
+  if (fp != NULL)
+    return fp (a) + 10;
+  return 10;
+}
diff --git a/elf/testobj6.c b/elf/testobj6.c
new file mode 100644 (file)
index 0000000..42bfc8e
--- /dev/null
@@ -0,0 +1,17 @@
+int
+obj6func1 (int a __attribute__ ((unused)))
+{
+  return 77;
+}
+
+int
+obj6func2 (int a)
+{
+  return foo (a) + 46;
+}
+
+int
+preload (int a)
+{
+  return a;
+}