libwine: Add support for relocating MS-style imports that use OriginalFirstThunk.
This commit is contained in:
parent
6e90756307
commit
4eb350b86b
|
@ -277,7 +277,7 @@ static void fixup_imports( IMAGE_IMPORT_DESCRIPTOR *dir, BYTE *base, int delta )
|
|||
fixup_rva_dwords( &dir->u.OriginalFirstThunk, delta, 1 );
|
||||
fixup_rva_dwords( &dir->Name, delta, 1 );
|
||||
fixup_rva_dwords( &dir->FirstThunk, delta, 1 );
|
||||
ptr = (UINT_PTR *)(base + dir->FirstThunk);
|
||||
ptr = (UINT_PTR *)(base + (dir->u.OriginalFirstThunk ? dir->u.OriginalFirstThunk : dir->FirstThunk));
|
||||
while (*ptr)
|
||||
{
|
||||
if (!(*ptr & IMAGE_ORDINAL_FLAG)) *ptr += delta;
|
||||
|
|
Loading…
Reference in New Issue