about summary refs log tree commit diff stats
path: root/src/os/os_linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/os_linux.c')
-rw-r--r--src/os/os_linux.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/os/os_linux.c b/src/os/os_linux.c
index daef3807..6d9db214 100644
--- a/src/os/os_linux.c
+++ b/src/os/os_linux.c
@@ -8,6 +8,8 @@
 #include "signals.h"
 #include "emu/x64int_private.h"
 #include "bridge.h"
+#include "elfloader.h"
+#include "env.h"
 
 int GetTID(void)
 {
@@ -54,6 +56,11 @@ void PersonalityAddrLimit32Bit(void)
     personality(ADDR_LIMIT_32BIT);
 }
 
+int IsAddrElfOrFileMapped(uintptr_t addr)
+{
+    return FindElfAddress(my_context, addr) || IsAddrFileMapped(addr, NULL, NULL);
+}
+
 void* InternalMmap(void* addr, unsigned long length, int prot, int flags, int fd, ssize_t offset)
 {
 #if 1 // def STATICBUILD