it works on wince now (only with dlls)
committer: ml1050 <ml1050> 1146763013 +0000
This commit is contained in:
@@ -219,15 +219,10 @@ static int read(void)
|
|||||||
if (((int) vaddr) == -1)
|
if (((int) vaddr) == -1)
|
||||||
return print("mmap() failed: %d\n", errno);
|
return print("mmap() failed: %d\n", errno);
|
||||||
#else
|
#else
|
||||||
for (ic = 0x10000; ic < 0x80000; ic += 0x10000)
|
if ((vaddr = VirtualAlloc(0, ih.imagesize,
|
||||||
{
|
|
||||||
if ((vaddr = VirtualAlloc((void *) ic, 0x10000,
|
|
||||||
MEM_COMMIT, PAGE_EXECUTE_READWRITE)) == 0)
|
MEM_COMMIT, PAGE_EXECUTE_READWRITE)) == 0)
|
||||||
return print("VirtualAlloc() %x failed\n", ic);
|
return print("VirtualAlloc() failed\n");
|
||||||
print("VirtualAlloc() & memset ok %x\n", ic);
|
print("VirtualAlloc() ok %x\n", vaddr);
|
||||||
print("%p %p %p\n", &ic, read, &out);
|
|
||||||
}
|
|
||||||
vaddr = (void *) UPX_MMAP_ADDRESS;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (ic = 1; ic <= 2; ic++)
|
for (ic = 1; ic <= 2; ic++)
|
||||||
@@ -334,13 +329,13 @@ static int main2(int argc, char **argv)
|
|||||||
return 2;
|
return 2;
|
||||||
if (read())
|
if (read())
|
||||||
return 3;
|
return 3;
|
||||||
dump('o');
|
dump('0');
|
||||||
if (import())
|
if (import())
|
||||||
return 4;
|
return 4;
|
||||||
dump('i');
|
dump('1');
|
||||||
if (reloc())
|
if (reloc())
|
||||||
return 5;
|
return 5;
|
||||||
dump('r');
|
dump('2');
|
||||||
|
|
||||||
call();
|
call();
|
||||||
print("ok.\n");
|
print("ok.\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user