diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/gnu-ifunc-lib.c')
-rw-r--r-- | gdb/testsuite/gdb.base/gnu-ifunc-lib.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc-lib.c b/gdb/testsuite/gdb.base/gnu-ifunc-lib.c index b9d446c..7aac81f 100644 --- a/gdb/testsuite/gdb.base/gnu-ifunc-lib.c +++ b/gdb/testsuite/gdb.base/gnu-ifunc-lib.c @@ -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 |