mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-27 03:51:15 +08:00
2cb10f02b0
gas/testsuite/gas/all/ gas.exp gas/testsuite/gas/loongarch/ jmp_op.d jmp_op.s macro_op.d macro_op.s macro_op_32.d macro_op_32.s macro_op_large_abs.d macro_op_large_abs.s macro_op_large_pc.d macro_op_large_pc.s reloc.d reloc.s ld/testsuite/ld-elf/ pr26936.d shared.exp ld/testsuite/ld-loongarch-elf/ attr-ifunc-4.c attr-ifunc-4.out disas-jirl.d ifunc.exp jmp_op.d jmp_op.s libnopic-global.s macro_op.d macro_op.s macro_op_32.d macro_op_32.s nopic-global-so.rd nopic-global-so.sd nopic-global.out nopic-global.s nopic-global.sd nopic-global.xd nopic-local.out nopic-local.rd nopic-local.s nopic-local.sd nopic-local.xd nopic-weak-global-so.rd nopic-weak-global-so.sd nopic-weak-global.out nopic-weak-global.s nopic-weak-global.sd nopic-weak-global.xd nopic-weak-local.out nopic-weak-local.rd nopic-weak-local.s nopic-weak-local.sd nopic-weak-local.xd pic.exp pic.ld
24 lines
360 B
C
24 lines
360 B
C
/* { dg-do run } */
|
|
/* { dg-require-ifunc "" } */
|
|
/* { dg-options "" } */
|
|
|
|
#include <stdio.h>
|
|
|
|
static int implementation (void)
|
|
{
|
|
printf ("'ere I am JH\n");
|
|
return 0;
|
|
}
|
|
|
|
static __typeof__ (implementation)* resolver (void)
|
|
{
|
|
return implementation;
|
|
}
|
|
|
|
static int magic (void) __attribute__ ((ifunc ("resolver")));
|
|
|
|
int main ()
|
|
{
|
|
return magic () != 0;
|
|
}
|