comparison loader/win32.c @ 21313:fe547c3298eb

Remove unused unk_exp1 loader asm code
author reimar
date Mon, 27 Nov 2006 16:17:29 +0000
parents 0c342e00c63d
children fef7a6713be2
comparison
equal deleted inserted replaced
21312:d78e7d5bc6d5 21313:fe547c3298eb
5314 5314
5315 } 5315 }
5316 5316
5317 //static void add_stub(int pos) 5317 //static void add_stub(int pos)
5318 5318
5319 extern int unk_exp1;
5320 static int pos=0; 5319 static int pos=0;
5321 static char extcode[20000];// place for 200 unresolved exports 5320 static char extcode[20000];// place for 200 unresolved exports
5322 static const char* called_unk = "Called unk_%s\n"; 5321 static const char* called_unk = "Called unk_%s\n";
5323 5322
5324 static void* add_stub(void) 5323 static void* add_stub(void)
5325 { 5324 {
5326 // generated code in runtime! 5325 // generated code in runtime!
5327 char* answ = (char*)extcode+pos*0x30; 5326 char* answ = (char*)extcode+pos*0x30;
5328 #if 0
5329 memcpy(answ, &unk_exp1, 0x64);
5330 *(int*)(answ+9)=pos;
5331 *(int*)(answ+47)-=((int)answ-(int)&unk_exp1);
5332 #endif
5333 memcpy(answ, ext_stubs, 0x2f); // 0x2c is current size 5327 memcpy(answ, ext_stubs, 0x2f); // 0x2c is current size
5334 //answ[4] = 0xb8; // movl $0, eax (0xb8 0x00000000) 5328 //answ[4] = 0xb8; // movl $0, eax (0xb8 0x00000000)
5335 *((int*) (answ + 5)) = pos; 5329 *((int*) (answ + 5)) = pos;
5336 //answ[9] = 0xba; // movl $0, edx (0xba 0x00000000) 5330 //answ[9] = 0xba; // movl $0, edx (0xba 0x00000000)
5337 *((long*) (answ + 10)) = (long)printf; 5331 *((long*) (answ + 10)) = (long)printf;