Commit 4eb350b8 authored by Alexandre Julliard's avatar Alexandre Julliard

libwine: Add support for relocating MS-style imports that use OriginalFirstThunk.

parent 6e907563
......@@ -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;
......
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