What does the following line mean:
...
401147: ff 24 c5 80 26 40 00 jmpq *0x402680(,%rax,8)
...
What does the asterisk in front of the
Minimal example
To make things clearer:
.data
# Store he address of the label in the data section.
symbol: .int label
.text
# Jumps to label.
jmp *symbol
label:
GitHub upstream.
Without the *
, it would jump to the address of symbol
in the .data
section and segfault.
I feel this syntax is a bit inconsistent, because for most instructions:
mov symbol, %eax
mov label, %eax
already moves the data at the address symbol
, and $symbol
is used for the address. Intel syntax is more consistent in this point as it always uses []
for dereference.
The *
is of course a mnemonic for the C dereference operator *ptr
.