Projet_SETI_RISC-V/riscv-gnu-toolchain/gdb/ld/testsuite/ld-ifunc/pr18841b.c
2023-03-06 14:48:14 +01:00

21 lines
301 B
C

void foo() __attribute__((ifunc("resolve_foo")));
static void foo_impl() {}
extern void abort (void);
void test()
{
void (*pg)(void) = foo;
if (pg != foo_impl)
abort ();
pg();
}
static void* resolve_foo()
{
extern void zoo(void);
void (*pz)(void) = zoo;
pz();
return foo_impl;
}