Hello. If I have the following code in Windows VC++:
DWORD somevar = 0x12345678;
_asm call dword ptr [somevar]
How can I make the same thing in GCC inline-assembly, with AT&T syntax?
__asm__ __volatile__ (
"call dword ptr [%%edx]" : :
"d" (somevar)
);
I've tried something like this, but it generates an "junk" error...
And then I tried to pass somevar
to some registers, and then convert it to dword
, ptr
, etc, but I can't get it to work.
Thanks in advance.
UPDATE: I found something that would be useful, like it seems that we have to use parenthesis instead of brackets in that case, and I found something with lcall
to call as far
. But I still can't understand how I can reproduce dword ptr
.