“C++ in Elvenland”
summary
Walks a compiled C++ binary from ELF header through sections and symbols, and shows live demos with objdump and readelf and using objcopy embedding to pack data into object files. Explains concrete surprises: const globals can be optimized away, inline implies weak linkage which avoids multiple-definition errors, relocations act as runtime patches, LTO passes LLVM bitcode in sections, the BuildID and eh_frame is ubiquitous even for plain C, and how strip/remove-section flags change size but can break execution.
AI-written summary · about
chapters (14)
- 0:00Welcome and introduction
- 10:50Embedding data in ELF
- 13:22Sections vs segments
- 17:01C++ symbol mangling
- 22:51Weak symbols and inline
- 33:43Link time optimization
- 35:11Debug sections and DWARF
- 36:42Exception handling
- 40:46RTTI and virtual tables
- 41:11Relocations and binary patching
- 42:43Static initialization
- 44:31GNU stack and protections
- 45:15Shrinking binaries
- 55:55Q&A session
related talks
48mMy Little Object File: How Linkers Implement C++
31mAmong ELFs and DWARFs
01h 02mHow Linux Elf Symbols Work and How They Are Used in C++ and C Programming
01h 02mHow symbols work and why we need them
01mTalk Preview: How Symbols Work and Why We Need Them
01h 26mWhat Does the Linker Actually Do for Us?
01h 00mFrom Program to Process - What Happens After the Compiler
01h 02m“Everything You Ever Wanted to Know about DLLs”
