Commit | Line | Data |
---|---|---|
1659f720 L |
1 | #include <stdio.h> |
2 | #include <bfd_stdint.h> | |
3 | ||
4 | extern void foo (void); | |
5 | ||
6 | void | |
7 | new_foo (void) | |
8 | { | |
9 | } | |
10 | ||
11 | __asm__(".symver new_foo, foo@@VERS_2.0"); | |
12 | ||
13 | __attribute__ ((noinline, noclone)) | |
14 | int | |
15 | bar (void) | |
16 | { | |
17 | return (intptr_t) &foo == 0x12345678 ? 1 : 0; | |
18 | } | |
19 | ||
20 | int | |
21 | main(void) | |
22 | { | |
23 | bar (); | |
24 | printf("PASS\n"); | |
25 | return 0; | |
26 | } |