Projet_SETI_RISC-V/riscv-gnu-toolchain/binutils/gold/testsuite/ifuncmod6.c

23 lines
289 B
C
Raw Normal View History

2023-03-06 14:48:14 +01:00
/* Test STT_GNU_IFUNC symbol reference in a shared library. */
extern int foo (void);
typedef int (*foo_p) (void);
extern foo_p get_foo_p (void);
extern int call_foo (void);
extern foo_p foo_ptr;
foo_p
get_foo_p (void)
{
return foo_ptr;
}
int
call_foo (void)
{
return foo ();
}