• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #include "tests/sys_mman.h"
2 
main(void)3 int main ( void )
4 {
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) ();
18 }
19 
20