• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: assembly jmp to hard-coded address with gcc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: assembly jmp to hard-coded address with gcc
      • From: Steve Checkoway <email@hidden>
References: 
 >assembly jmp to hard-coded address with gcc (From: Aron-Zvi <email@hidden>)

  • Prev by Date: Re: Loading Kernel Extension
  • Next by Date: Re: assembly jmp to hard-coded address with gcc
  • Previous by thread: assembly jmp to hard-coded address with gcc
  • Next by thread: Re: assembly jmp to hard-coded address with gcc
  • Index(es):
    • Date
    • Thread