Master the fundamental concepts of binary formats through this focused micro-challenge.
Symbols are the names that linkers use to connect references between object files. The symbol table maps names to addresses, sizes, and types. Without symbols, you see raw addresses; with them, you see function and variable names.
Each Elf64_Sym entry contains:
st_name: String table offset for the symbol namest_info: Type and binding packed togetherst_value: Address or offset of the symbolst_size: Size in bytesst_shndx: Section index where definedSymbol types (from st_info & 0x0F):
STT_FUNC (2): Function (for example main)STT_OBJECT (1): Data object (for example a global variable)STT_NOTYPE (0): UnspecifiedBindings: STB_LOCAL is visible only in its object file, STB_GLOBAL is visible to all files being linked.
You will parse symbol entries from .symtab, resolve names via .strtab, and print each symbol's type and binding. This is the same data nm and objdump -t display, and it is essential for understanding what a binary exports and imports.
The .dynsym table lists symbols needed for runtime linking: imported functions like printf and exported entry points. The full .symtab includes local symbols stripped from release builds. Undefined global functions show st_value = 0 until the dynamic linker resolves them at load time. Parsing both tables tells you what a binary calls and what it exposes to other modules.
Implement an ELF symbol table parser in C.
Requirements:
Test:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
All starter code and reference implementations are available for your local setup.
View on Github