aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elf/pr29797.c
blob: 9e3113fe98d3692e93b510281fd682890edd0cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <stdio.h>

static int foo (int x) __attribute__ ((ifunc ("resolve_foo")));

static int foo_impl(int x)
{
  return x;
}

static void *resolve_foo (void)
{
  return (void *) foo_impl;
}

int
main ()
{
  foo (0);
  puts ("PASS");
  return 0;
}