Master the fundamental concepts of linkers & loaders through this focused micro-challenge.
Compilers emit object files (.o), not executables. ELF on Linux, Mach-O on macOS, COFF on Windows: all contain machine code, symbol tables, and relocation entries. readelf and LLVM's llvm-objdump are daily tools for backend engineers.
.text holds code. .data and .bss hold initialized and zero-initialized data. .symtab lists symbols with binding (local/global/weak) and section index. .rela.text records fixup sites that the linker must patch.
cLoading…
.debug_info) map to source linesProduction compilers embed this step inside a longer pipeline. GCC flows through cpp, cc1, assembly, and ld; Clang uses the driver, Sema, LLVM IR passes, and a target backend. LLVM bitcode, JVM bytecode, and WASM are other familiar IRs at the same layer. The exercise isolates one pass so you can test it alone before chaining it to the next stage.
You will parse and understand object file structure for ELF. This exercise asks you to read section headers, symbol tables, and relocation entries from a simple compiled object.
Implement ELF object file parser.
Requirements:
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