Non-contiguous memory regions support: Avoid calls to abort
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / pr18718.c
CommitLineData
1659f720
L
1#include <stdio.h>
2#include <bfd_stdint.h>
3
4extern void foo (void);
37d7d56c 5extern void check_ptr_eq (void (*) (void), void (*) (void));
1659f720
L
6
7void
8new_foo (void)
9{
10}
11
12__asm__(".symver new_foo, foo@@VERS_2.0");
4e95fbcd
AM
13#if defined __powerpc64__ && defined _CALL_AIXDESC && !defined _CALL_LINUX
14__asm__(".symver .new_foo, .foo@@VERS_2.0");
15#endif
1659f720 16
60b57502 17#if defined(__GNUC__) && (__GNUC__ * 1000 + __GNUC_MINOR__) >= 4005
1659f720 18__attribute__ ((noinline, noclone))
60b57502
L
19#else
20__attribute__ ((noinline))
21#endif
1659f720
L
22int
23bar (void)
24{
25 return (intptr_t) &foo == 0x12345678 ? 1 : 0;
26}
27
28int
29main(void)
30{
31 bar ();
c45bd4fd 32 check_ptr_eq (&foo, &new_foo);
1659f720
L
33 printf("PASS\n");
34 return 0;
35}
This page took 0.244059 seconds and 4 git commands to generate.