OSDN Git Service

PR libffi/40700
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Dec 2009 10:09:17 +0000 (10:09 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 10 Dec 2009 10:09:17 +0000 (10:09 +0000)
* src/closures.c [X86_64 && __sun__ && __svr4__]
(FFI_MMAP_EXEC_WRIT): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155124 138bc75d-0d04-0410-961f-82ee72b054a4

libffi/ChangeLog
libffi/src/closures.c

index 950b7fd..029735f 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-10  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
+
+       PR libffi/40700
+       * src/closures.c [X86_64 && __sun__ && __svr4__]
+       (FFI_MMAP_EXEC_WRIT): Define.
+
 2009-12-08  David Daney  <ddaney@caviumnetworks.com>
 
        * testsuite/libffi.call/stret_medium.c: Remove xfail for mips*-*-*
index f07ad06..48cb415 100644 (file)
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------
    closures.c - Copyright (c) 2007  Red Hat, Inc.
-   Copyright (C) 2007 Free Software Foundation, Inc
+   Copyright (C) 2007, 2009 Free Software Foundation, Inc
 
    Code to allocate and deallocate memory for closures.
 
    executable memory. */
 #  define FFI_MMAP_EXEC_WRIT 1
 # endif
+# if defined(X86_64) && defined(__sun__) && defined(__svr4__)
+/* The data segment on 64-bit Solaris/x86 isn't executable, so use mmap
+   instead.  */
+#  define FFI_MMAP_EXEC_WRIT 1
+# endif
 #endif
 
 #if FFI_MMAP_EXEC_WRIT && !defined FFI_MMAP_EXEC_SELINUX