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

21 lines
316 B
C
Raw Permalink Normal View History

2023-03-06 14:48:14 +01:00
/* Test global variable initialized to hidden STT_GNU_IFUNC symbol. */
int didit;
extern void doit (void);
void
doit (void)
{
didit = 1;
}
void (*get_foo (void)) (void) __asm__ ("foo");
__asm__ (".type foo, %gnu_indirect_function");
__asm__ (".hidden foo");
void (*get_foo (void)) (void)
{
return &doit;
}