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

This commit is contained in:
Eric Pouech 2010-04-01 21:24:14 +02:00 committed by Alexandre Julliard
parent 51bce9b049
commit 34ef8d2113
3 changed files with 3 additions and 0 deletions

View File

@ -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];

View File

@ -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;

View File

@ -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;