Bug 480126 - Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
[valgrind.git] / memcheck / tests / badjump.c
blob923635fba8dcfadaddba26139322e143bd5bae76
1 #include "tests/sys_mman.h"
3 int main ( void )
5 #if defined(__powerpc64__) && _CALL_ELF != 2
6 /* on ppc64-linux, a function pointer points to a function
7 descriptor, not to the function's entry point. Hence to get
8 uniform behaviour on all supported targets - a jump to an
9 unmapped page - the following is needed. */
10 unsigned long long int p[3];
11 p[0] = (unsigned long long int)get_unmapped_page();
12 p[1] = 0;
13 p[2] = 0;
14 #else
15 char* p = get_unmapped_page();
16 #endif
17 return ((int(*)(void)) p) ();