Quiz Entry - updated: 2026.07.06
What does nop do and why does it appear in disassembly?
nop ("no operation") does nothing; the assembler inserts it to pad code so the next instruction lands on an aligned address.
ret
nop
nop
nop
Why it exists:
- Alignment: Functions are aligned to 16-byte boundaries for performance.
nopfills the gaps. - Multi-byte nop:
nopl 0x0(%rax)is a longer nop (takes more bytes but still does nothing) - Hot patching: Placeholder space for runtime code modification
In bomb labs: Ignore nop instructions completely — they have no effect on program behavior.
Go deeper: