dbghelp: Don't enforce child architecture in elf_map_file().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2018-05-31 17:26:21 -05:00 committed by Alexandre Julliard
parent 8261609197
commit c2c0e4fe51
1 changed files with 1 additions and 6 deletions

View File

@ -346,12 +346,7 @@ static BOOL elf_map_file(struct elf_map_file_data* emfd, struct image_file_map*
/* and check for an ELF header */
if (memcmp(fmap->u.elf.elfhdr.e_ident,
elf_signature, sizeof(elf_signature))) goto done;
/* and check 32 vs 64 size according to current machine */
#ifdef _WIN64
if (fmap->u.elf.elfhdr.e_ident[EI_CLASS] != ELFCLASS64) goto done;
#else
if (fmap->u.elf.elfhdr.e_ident[EI_CLASS] != ELFCLASS32) goto done;
#endif
fmap->addr_size = fmap->u.elf.elfhdr.e_ident[EI_CLASS] == ELFCLASS64 ? 64 : 32;
fmap->u.elf.sect = HeapAlloc(GetProcessHeap(), 0,
fmap->u.elf.elfhdr.e_shnum * sizeof(fmap->u.elf.sect[0]));