Re: x86-64 asm question
Re: x86-64 asm question
- Subject: Re: x86-64 asm question
- From: Cyrus Harmon <email@hidden>
- Date: Mon, 4 Sep 2006 17:06:17 -0700
The linux version of gas (with .global, not just .globl) seems to
handle this code fine. Is it implicitly doing some sort of IP-
relative indexing? Is there something weird about Apple's assembler
going on here? I'm willing to believe that I need to do some %rip
relative addressing, I'm just not convinced that the way I'm trying
to do it is giving me the right results (or, really, what those
should look like).
I tried something similar before, and got it to compile, but wasn't
sure if that was the right approach. Some docs on 1) if this needs to
be done realtive to %rip, and 2) how to properly do so, would be great.
Thank,
Cyrus
On Sep 4, 2006, at 4:56 PM, Scott Lamb wrote:
On Sep 4, 2006, at 3:57 PM, Cyrus Harmon wrote:
So, using gas I'm trying to port some x86 assembly code that
refers to an external symbol:
.text
.globl _all_threads
...
...
mov _all_threads,%rax
...
the error message I get is:
x86-64-assem.S:133:32-bit absolute addressing is not supported for
x86-64
That works on x86 (well, with êx, of course), but I can't seem
to figure out how to do this on x86-64, or any relevant docs on
Apple's x86-64 assembler.
IIRC, x86_64 uses IP-relative addresses. And in a x64_64-linux
project of mine, I found this line:
movl sigsafe_key_(%rip), íi
--
Scott Lamb <http://www.slamb.org/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden