Eric Pouech : dbghelp: Store delta used for re-locating a module.

Alexandre Julliard julliard at winehq.org
Fri Apr 2 10:17:10 CDT 2010


Module: wine
Branch: master
Commit: 34ef8d21131ff2396e3ae432c403d546385a820f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=34ef8d21131ff2396e3ae432c403d546385a820f

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Thu Apr  1 21:24:14 2010 +0200

dbghelp: Store delta used for re-locating a module.

---

 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-cvs mailing list