Commit 34ef8d21 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

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

parent 51bce9b0
......@@ -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];
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment