diff options
Diffstat (limited to 'ld/testsuite/ld-ifunc/lib.c')
-rw-r--r-- | ld/testsuite/ld-ifunc/lib.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/ld/testsuite/ld-ifunc/lib.c b/ld/testsuite/ld-ifunc/lib.c index 5bfd2cd..393dabf 100644 --- a/ld/testsuite/ld-ifunc/lib.c +++ b/ld/testsuite/ld-ifunc/lib.c @@ -15,6 +15,19 @@ void * library_func2_ifunc (void) __asm__ ("library_func2"); void * library_func2_ifunc (void) { return global ? minus_one : zero ; } __asm__(".type library_func2, %gnu_indirect_function"); +extern int library_func2 (int); +extern __typeof (library_func2) library_func2 __asm__ ("__GI_library_func2"); + +__asm__(".global __GI_library_func2"); +__asm__(".hidden __GI_library_func2"); +__asm__(".set __GI_library_func2, library_func2"); + +int +library_func (int x) +{ + return library_func2 (x); +} + #else /* WITHOUT_IFUNC */ int |