From 2db2af9343b599b4134997b3dd87dc768649458d Mon Sep 17 00:00:00 2001 From: Ruben Gonzalez Date: Sat, 25 Mar 2017 09:29:45 -0400 Subject: [PATCH] Fix GDC's Linux SIg offset checking (NPOTB). --- tools/gdc-psyfork/gdc.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gdc-psyfork/gdc.cpp b/tools/gdc-psyfork/gdc.cpp index c9ca7bbf..8c1fb052 100644 --- a/tools/gdc-psyfork/gdc.cpp +++ b/tools/gdc-psyfork/gdc.cpp @@ -571,7 +571,9 @@ void *GetLinuxSigPtr(void *handle, const char* symbol) if (real_bytes >= 1) { - return mu.FindPattern(handle, (char*)real_sig, real_bytes, matches, dummy); + struct link_map *dlmap = (struct link_map *)handle; + + return mu.FindPattern((void *)dlmap->l_addr, (char*)real_sig, real_bytes, matches, dummy); } }