git diff 6a99edb8082f75e523e0d6ebaba42218b80e10c8 aea22de28ec92a69cab9198de479263fe8b1a637

diff --git a/src/pa/linux.S b/src/pa/linux.S
index 2d3b036..fdd4332 100644
--- a/src/pa/linux.S
+++ b/src/pa/linux.S
@@ -425,3 +425,7 @@ ffi_closure_pa32:
 
 	.align 4
 .LEFDE2:
+
+#if defined(__ELF__) && defined(__linux__)
+.section .note.GNU-stack,"",%progbits
+#endif
diff --git a/src/powerpc/ffi.c b/src/powerpc/ffi.c
index 0a97741..3601cc4 100644
--- a/src/powerpc/ffi.c
+++ b/src/powerpc/ffi.c
@@ -183,6 +183,12 @@ ffi_tramp_arch (size_t *tramp_size, size_t *map_size)
   extern void *trampoline_code_table;
   *tramp_size = PPC_TRAMP_SIZE;
   *map_size = PPC_TRAMP_MAP_SIZE;
+#if defined (_CALL_AIX) || _CALL_ELF == 1
+  /* The caller wants the entry point address of the trampoline code,
+     not the address of the function descriptor.  */
+  return *(void **)trampoline_code_table;
+#else
   return &trampoline_code_table;
+#endif
 }
 #endif
