]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - elf/testobj1.c
install.texi: Build was tested with binutils 2.41 (just released)
[thirdparty/glibc.git] / elf / testobj1.c
index 9f64d675c49f43dee6687311af6d5cf0107cc25b..5ab20efd62976ef68f571238f7e35d51366bafa8 100644 (file)
@@ -1,3 +1,8 @@
+#include <dlfcn.h>
+#include <stdlib.h>
+
+#include "testobj.h"
+
 int
 obj1func1 (int a __attribute__ ((unused)))
 {
@@ -9,3 +14,12 @@ obj1func2 (int a)
 {
   return foo (a) + 10;
 }
+
+int
+preload (int a)
+{
+  int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
+  if (fp != NULL)
+    return fp (a) + 10;
+  return 10;
+}