Extend GNU ifunc testcases
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / gnu-ifunc-lib.c
index b9d446c92fad8745964f973d28227e59fe6bd2a3..7aac81faec6e7635b0df0d0fd1fa1fe3c9b41424 100644 (file)
@@ -22,10 +22,14 @@ extern int final (int arg);
 
 typedef int (*final_t) (int arg);
 
+#ifndef IFUNC_RESOLVER_ATTR
 asm (".type gnu_ifunc, %gnu_indirect_function");
-
 final_t
 gnu_ifunc (unsigned long hwcap)
+#else
+final_t
+gnu_ifunc_resolver (unsigned long hwcap)
+#endif
 {
   resolver_hwcap = hwcap;
   if (! gnu_ifunc_initialized)
@@ -33,3 +37,9 @@ gnu_ifunc (unsigned long hwcap)
   else
     return final;
 }
+
+#ifdef IFUNC_RESOLVER_ATTR
+extern int gnu_ifunc (int arg);
+
+__typeof (gnu_ifunc) gnu_ifunc __attribute__ ((ifunc ("gnu_ifunc_resolver")));
+#endif
This page took 0.113573 seconds and 4 git commands to generate.