2011-07-13 Sriraman Tallam <tmsriram@google.com>
[platform/upstream/binutils.git] / gold / testsuite / ifuncvar1.c
1 /* Test global variable initialized to hidden STT_GNU_IFUNC symbol.  */
2
3 int didit;
4
5 extern void doit (void);
6
7 void
8 doit (void)
9 {
10   didit = 1;
11 }
12
13 void (*get_foo (void)) (void) __asm__ ("foo");
14 __asm__ (".type foo, %gnu_indirect_function");
15 __asm__ (".hidden foo");
16
17 void (*get_foo (void)) (void)
18 {
19   return &doit;
20 }