Note: the final, optional video is not included in the playlist.
On Linux and most Unix variants (but not Mac OS X), executables, object files, and shared libraries all use a format known as ELF (Executable and Linkable Format). These videos look at the kinds of problems that the representation must solve and the details of how programs and libraries are represented in ELF.
- ELF 1: Overview 3:00A general overview of ELF.
- More details on the way ELF represents run-time and link-time views of code.
- ELF 3: Using readelf 5:00A demonstration of using readelf to print a human-readable summary of the content of an ELF file.
- Diving into details of ELF by implementing a readelf-like program that report an ELF file’s type.
- A discussion of the ways that ELF content refers to other content in the same ELF file: either as a file offset, or as a (predicted) run-time address.
- How object files are linked at the ELF level to produce an ELF executable.
- More details on ELF by extending the readelf-like program to list the sections in an ELF file, which especially demonstrates how to read strings (in this case, section names) from a string table.
- Why shared libraries need position-independent code and, at a high level, how position-independent code works.
- Details on how variables are referenced in position-independent code and how that implementation is represented in ELF.
- Details on how function calls are referenced in position-independent code and how that implementation is represented in ELF.
- More details on ELF by extending the readelf-like program to list the symbols in an ELF file.
- A brief investigation of the content of relocation sections—
that is, the sections that relate variables and functions used by position-independent code to the places that they are used.
- Examples of how machine code in a ELF file can be understood.
- Optional ELF 14: Some maps to ELF 6:54Explanation of some maps to help navigate ELF files in memory, which should help with the homework assignment.