Re: assembly jmp to hard-coded address with gcc
Re: assembly jmp to hard-coded address with gcc
- Subject: Re: assembly jmp to hard-coded address with gcc
- From: Thierry bultel <email@hidden>
- Date: Wed, 12 Aug 2009 09:00:28 +0200
Hi Aron,
I am not a x86 assembly expert, but I am pretty sure that jmp does not
take an immediate address
as a parameter.
You will get what you want with these 2 possible examples:
asm void trampoline(void)
{
push 0x66666666
push 0x66666666
# like this:
mov eax,0x66666666
jmp eax
# or like that:
jmp foo
foo:
push 0x66666666
}
Cheers,
Thierry
Aron-Zvi a écrit :
Hey guys,
I'm trying to compile the following program with gcc using -fasm-blocks
on OS X:
asm void trampoline(void)
{
push 0x66666666
push 0x66666666
jmp 0x66666666
}
gcc fails with "suffix or operands invalid for `jmp'".
The code will be copied into memory and the addresses will be fixed
later on. How can I get the above to compile?
Thanks in advance,
Aron-Zvi
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|
begin:vcard
fn:Thierry Bultel
n:Bultel;Thierry
org:Atempo SA;V.O.S team
adr;dom:;;+33297683688
email;internet:email@hidden
title:Software engineer
tel;work:+33297683688
note;quoted-printable:=0D=0A=
=0D=0A=
version:2.1
end:vcard
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden