about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-06-22 17:34:06 +0200
committervanhauser-thc <vh@thc.org>2021-06-22 17:34:06 +0200
commit56851fa4999a27e91736d11319757c3dcc83112a (patch)
treeda0f09466f2f44dce1246ae9f946f8efb95e0b29
parentcbac22d82b90d631bafc4572aa79faa0c568beeb (diff)
downloadafl++-56851fa4999a27e91736d11319757c3dcc83112a.tar.gz
frida fix
-rw-r--r--frida_mode/GNUmakefile3
-rw-r--r--frida_mode/src/cmplog/cmplog.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/frida_mode/GNUmakefile b/frida_mode/GNUmakefile
index 329d9f7f..c736006a 100644
--- a/frida_mode/GNUmakefile
+++ b/frida_mode/GNUmakefile
@@ -25,8 +25,7 @@ RT_CFLAGS:=-Wno-unused-parameter \
 LDFLAGS+=-shared \
 		 -lpthread \
 		 -lresolv \
-		 -ldl \
-		 -z noexecstack \
+		 -ldl
 
 ifdef DEBUG
 CFLAGS+=-Werror \
diff --git a/frida_mode/src/cmplog/cmplog.c b/frida_mode/src/cmplog/cmplog.c
index a6c95ab0..c65b98d0 100644
--- a/frida_mode/src/cmplog/cmplog.c
+++ b/frida_mode/src/cmplog/cmplog.c
@@ -106,7 +106,7 @@ gboolean cmplog_test_addr(guint64 addr, size_t size) {
    * Our address map can change (e.g. stack growth), use write as a fallback to
    * validate our address.
    */
-  ssize_t written = syscall(__NR_write, memfd, (void *)addr, size);
+  ssize_t written = syscall(SYS_write, memfd, (void *)addr, size);
   if (written < 0 && errno != EFAULT && errno != 0) {
     FATAL("CMPLOG - Failed __NR_write, errno: %d", errno);
   }