Retro68/binutils/ld/testsuite/ld-ifunc/ifunc-lib.c

30 lines
352 B
C
Raw Normal View History

2017-04-10 11:32:00 +00:00
static int
one (void)
{
return 1;
}
static int
minus_one (void)
{
return -1;
}
void * foo_ifunc (void) __asm__ ("foo");
__asm__(".type foo, %gnu_indirect_function");
void *
foo_ifunc (void)
{
return one;
}
void * bar_ifunc (void) __asm__ ("bar");
__asm__(".type bar, %gnu_indirect_function");
void *
bar_ifunc (void)
{
return minus_one;
}