dmd asm output
Artur Skawina
art.08.09 at gmail.com
Mon Apr 1 04:10:39 PDT 2013
On 04/01/13 12:24, js.mdnq wrote:
> On Monday, 1 April 2013 at 01:54:10 UTC, John Colvin wrote:
> What's after the code?
>
> The 0x76 call is an inline call function, the ret returns it. The stuff before it is setting up the registers for the call and what comes after
>
>> 0x0000000000000076 <+54>: call 0x7b <_D3sse5addtoFAiAiZv+59>
>> 0x000000000000007b <+59>: mov rsp,rbp
>> 0x000000000000007e <+62>: pop rbp
>> 0x000000000000007f <+63>: ret
>
> As you can see, the call is calling the function right below it, [...]
This is just how objdump/gdb shows the code - it does *not* display
relocations inline, so you get this misleading output. The call
instruction will not end up having a zero offset (that is why it
seems to point at the next op), but will be fixed up to call the
right function. Run
objdump -dr your_obj_or_exe_file
and the real call target will be shown as a relocation entry after
the call instruction.
artur
More information about the Digitalmars-d-learn
mailing list