How Linux Elf Symbols Work and How They Are Used in C++ and C Programming
summary
Simple example compiles values.c and main.c into object files, links an executable that returns 42, and is inspected with objdump nm readelf strip to show machine code, relocations, symbol table entries and the effect of stripping. ELF uses three symbol tables (static, dynamic, debug); relocations in object files let the linker fill call targets; weak and unique bindings handle inline/templates; visibility (default/hidden) controls exported APIs for shared objects.
AI-written summary · about
chapters (8)
- 0:00ELF symbols purpose
- 1:53Symbols and linking C/C++
- 10:27Investigating symbols OBJdump NM
- 19:52Linkage and symbol binding
- 29:01Weak and unique symbols
- 39:24Dynamic linking visibility
- 53:30Who gets a symbol
- 1:00:20Summary tools
related talks
01h 02mHow symbols work and why we need them
01h 26mWhat Does the Linker Actually Do for Us?
59m“C++ in Elvenland”
48mMy Little Object File: How Linkers Implement C++
31mAmong ELFs and DWARFs
01h 04mThe Bits Between the Bits: How We Get to main()
01h 01mHow to start a program
01h 00mFrom Program to Process - What Happens After the Compiler
