Im trying to convert a piece of Intel to AT&T but i know zero about ASM, this is the Intel code:
CODE
void __declspec(naked) __declspec(noreturn) UninjectSelf(HMODULE Module)
{
__asm
{
push -2
push 0
push Module
mov eax, TerminateThread
push eax
mov eax, FreeLibrary
jmp eax
}
}
This is what i got so far:
CODE
void __declspec(noreturn) UninjectSelf(HMODULE Module)
{
__asm("pushl $-2");
__asm("pushl $0");
__asm("pushl Module");
__asm("movl TerminateThread, %eax");
__asm("pushl %eax");
__asm("movl FreeLibrary, %eax");
__asm("jmp *%eax");
}
Im getting these errors:
CODE
[Linker error] undefined reference to `Module'
[Linker error] undefined reference to `TerminateThread'
[Linker error] undefined reference to `FreeLibrary'
It would be very kind if someone could fix this, and take a look at the part i already converted, since im not sure its right
EDIT: Help no longer needed, i downloaded a compiler that supported Intel instead
This post has been edited by TyVeryMuch: 10 Jun, 2008 - 07:09 AM