If I have the following code in Windows VC ++:
DWORD somevar = 0x12345678;
_asm call dword ptr [somevar]
How can I do the same in the GCC inline assembly, with AT & T syntax?
__asm__ __volatile__ (
"call dword ptr [%%edx]" : :
"d" (somevar)
);
I tried something like this, but it generates a garbage error ...
And then I tried to transfer somevarto some registers, and then convert it to dword, ptretc., but I could not get it to work.
UPDATE: I found something useful, it seems that in this case we should use brackets instead of brackets, and I found something with lcallto call far, but I still can’t figure out how I can reproduce dword ptr.