Quiz Entry - updated: 2026.07.06
What does jmp * (indirect jump) do and where does it appear?
The * means "indirect": jmp *addr reads the target address from memory (or a register) and jumps to whatever it finds there, rather than to a fixed label.
* jmp * reads its target from memory (table + index*8) or a register, then jumps there — the mechanism behind switch tables, function pointers, and vtable dispatch. *
# Direct: jump to fixed address
jmp .L_label
# Indirect: jump to address stored at [table + rdi*8]
jmp *.L4(,%rdi,8)
Breaking down jmp *.L4(,%rdi,8):
- Compute address:
.L4 + %rdi * 8 - Read 8 bytes from that address — this is the target
- Jump to the target
Where it appears:
- Switch statements — jump through a jump table
- Function pointers —
call *%raxcalls the function pointed to by%rax - Virtual dispatch (C++) —
call *offset(%rax)calls through vtable
Examine in GDB:
(gdb) x/a 0x402500
Shows the address stored at that location — the actual jump target.
Go deeper: