Add .cantunwind to _dl_start_user
[platform/upstream/glibc.git] / elf / testobj3.c
index 8e3d886..c025ff6 100644 (file)
@@ -1,3 +1,9 @@
+#include <dlfcn.h>
+#include <stdlib.h>
+
+#include "testobj.h"
+
+
 int
 obj3func1 (int a __attribute__ ((unused)))
 {
@@ -9,3 +15,12 @@ obj3func2 (int a)
 {
   return foo (a) + 42;
 }
+
+int
+preload (int a)
+{
+  int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
+  if (fp != NULL)
+    return fp (a) + 10;
+  return 10;
+}