[PATCH 2/4] [DbgHelp]: now storing delta used for re-locating a module
Eric Pouech
eric.pouech at orange.fr
Thu Apr 1 14:24:14 CDT 2010
A+
---
dlls/dbghelp/dbghelp_private.h | 1 +
dlls/dbghelp/elf_module.c | 1 +
dlls/dbghelp/module.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/dbghelp/dbghelp_private.h b/dlls/dbghelp/dbghelp_private.h
index a341b03..de764ae 100644
--- a/dlls/dbghelp/dbghelp_private.h
+++ b/dlls/dbghelp/dbghelp_private.h
@@ -353,6 +353,7 @@ struct module
struct module* next;
enum module_type type : 16;
unsigned short is_virtual : 1;
+ DWORD64 reloc_delta;
/* specific information for debug types */
struct module_format* format_info[DFI_LAST];
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index e0fab9c..132e40c 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -1080,6 +1080,7 @@ static BOOL elf_load_file(struct process* pcs, const WCHAR* filename,
HeapFree(GetProcessHeap(), 0, modfmt);
goto leave;
}
+ elf_info->module->reloc_delta = elf_info->module->module.BaseOfImage - fmap.u.elf.elf_start;
elf_module_info = (void*)(modfmt + 1);
elf_info->module->format_info[DFI_ELF] = modfmt;
modfmt->module = elf_info->module;
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index 8f12fef..e99bd7f 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -167,6 +167,7 @@ struct module* module_new(struct process* pcs, const WCHAR* name,
module->module.SourceIndexed = FALSE;
module->module.Publics = FALSE;
+ module->reloc_delta = 0;
module->type = type;
module->is_virtual = virtual ? TRUE : FALSE;
for (i = 0; i < DFI_LAST; i++) module->format_info[i] = NULL;
More information about the wine-patches
mailing list