mirror of
https://github.com/partic2/libffi
synced 2026-11-10 18:17:19 +00:00
Switch to quilt. Rebase to latest GCC.
This commit is contained in:
@@ -0,0 +1,76 @@
|
||||
Index: plibffi/src/closures.c
|
||||
===================================================================
|
||||
--- plibffi.orig/src/closures.c
|
||||
+++ plibffi/src/closures.c
|
||||
@@ -214,6 +214,8 @@ static int dlmunmap(void *, size_t);
|
||||
|
||||
#if !(defined(X86_WIN32) || defined(X86_WIN64)) || defined (__CYGWIN__)
|
||||
|
||||
+#if FFI_MMAP_EXEC_SELINUX
|
||||
+
|
||||
/* A mutex used to synchronize access to *exec* variables in this file. */
|
||||
static pthread_mutex_t open_temp_exec_file_mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||
|
||||
@@ -483,6 +485,27 @@ dlmmap (void *start, size_t length, int
|
||||
return dlmmap_locked (start, length, prot, flags, offset);
|
||||
}
|
||||
|
||||
+#else
|
||||
+
|
||||
+static void *
|
||||
+dlmmap (void *start, size_t length, int prot,
|
||||
+ int flags, int fd, off_t offset)
|
||||
+{
|
||||
+
|
||||
+ assert (start == NULL && length % malloc_getpagesize == 0
|
||||
+ && prot == (PROT_READ | PROT_WRITE)
|
||||
+ && flags == (MAP_PRIVATE | MAP_ANONYMOUS)
|
||||
+ && fd == -1 && offset == 0);
|
||||
+
|
||||
+#if FFI_CLOSURE_TEST
|
||||
+ printf ("mapping in %zi\n", length);
|
||||
+#endif
|
||||
+
|
||||
+ return mmap (start, length, prot | PROT_EXEC, flags, fd, offset);
|
||||
+}
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/* Release memory at the given address, as well as the corresponding
|
||||
executable page if it's separate. */
|
||||
static int
|
||||
Index: plibffi/ChangeLog.libffi
|
||||
===================================================================
|
||||
--- plibffi.orig/ChangeLog.libffi
|
||||
+++ plibffi/ChangeLog.libffi
|
||||
@@ -1,3 +1,11 @@
|
||||
+2009-10-27 Abdulaziz Ghuloum <aghuloum@gmail.com>
|
||||
+
|
||||
+ * configure.ac (FFI_MMAP_EXEC_WRIT): Define for snow
|
||||
+ leopard (i?86-apple-darwin10*).
|
||||
+ * configure: Rebuilt.
|
||||
+ * fficonfig.h.in: Rebuilt.
|
||||
+ * src/closures.c (dlmmap): Define version for snow leopard.
|
||||
+
|
||||
2009-10-05 Bradley Smith <brad@brad-smith.co.uk>
|
||||
|
||||
* configure.ac, Makefile.am, src/avr32/ffi.c,
|
||||
Index: plibffi/configure.ac
|
||||
===================================================================
|
||||
--- plibffi.orig/configure.ac
|
||||
+++ plibffi/configure.ac
|
||||
@@ -274,6 +274,14 @@ if test x$TARGET = xX86 || test x$TARGET
|
||||
fi
|
||||
fi
|
||||
|
||||
+case "$target" in
|
||||
+ i?86-apple-darwin10*)
|
||||
+ AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1,
|
||||
+ [Cannot use malloc on this target, so, we revert to
|
||||
+ alternative means])
|
||||
+ ;;
|
||||
+esac
|
||||
+
|
||||
AC_CACHE_CHECK([whether .eh_frame section should be read-only],
|
||||
libffi_cv_ro_eh_frame, [
|
||||
libffi_cv_ro_eh_frame=no
|
||||
Reference in New Issue
Block a user