dbghelp: Make ehdr_addr in elf_enum_modules_internal dependent on AT_SYSINFO_EHDR.

This commit is contained in:
Gerald Pfeifer 2010-12-28 22:24:57 +01:00 committed by Alexandre Julliard
parent ba1f962d10
commit 8f7d06b69b
1 changed files with 9 additions and 4 deletions

View File

@ -1404,7 +1404,6 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
struct link_map lm;
char bufstr[256];
WCHAR bufstrW[MAX_PATH];
unsigned long ehdr_addr;
if (!pcs->dbg_hdr_addr ||
!ReadProcessMemory(pcs->handle, (void*)pcs->dbg_hdr_addr,
@ -1431,12 +1430,18 @@ static BOOL elf_enum_modules_internal(const struct process* pcs,
if (!cb(bufstrW, (unsigned long)lm.l_addr, (unsigned long)lm.l_ld, FALSE, user)) break;
}
}
#ifdef AT_SYSINFO_EHDR
if (!lm_addr && elf_search_auxv(pcs, AT_SYSINFO_EHDR, &ehdr_addr))
if (!lm_addr)
{
unsigned long ehdr_addr;
if (elf_search_auxv(pcs, AT_SYSINFO_EHDR, &ehdr_addr))
{
static const WCHAR vdsoW[] = {'[','v','d','s','o',']','.','s','o',0};
cb(vdsoW, ehdr_addr, 0, TRUE, user);
}
}
#endif
return TRUE;
}