Quiz Entry - updated: 2026.07.07
How can you inspect an executable file?
readelf -a shows the ELF structure (headers, sections, symbols); objdump -d disassembles the machine code back to assembly.
# Show all ELF information
$ readelf -a p24
# Disassemble
$ objdump -d p24
Example objdump output:
p24: file format elf64-x86-64
...
Disassembly of section .text:
00000000000010c0 <_start>:
10c0: f3 0f 1e fa endbr64
10c4: 31 ed xor %ebp,%ebp
10c6: 49 89 d1 mov %rdx,%r9
...
00000000000011a9 <main>:
11a9: f3 0f 1e fa endbr64
11ad: 55 push %rbp
11ae: 48 89 e5 mov %rsp,%rbp
The output shows: address, machine code bytes, and assembly mnemonic.
Go deeper:
Executable and Linkable Format (Wikipedia) — the ELF layout (headers, sections, program headers) that readelf/objdump walk when you inspect a binary.
Disassembler (Wikipedia) — how objdump recovers assembly from machine code, and the hard parts (code-vs-data, variable-width instructions).