Skip to content
0:00 / 0:00

#elf#linux#linker

In-depth: ELF - The Extensible & Linkable Format

stacksmashing

229K subscribers • 13 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Linked in the descriptionBR903/ELFkickers

Intermediate. Assumes working knowledge.

250K views6 years ago1 recommendation

Systems programmingSecurityOperating systemsCompilers and interpretersReverse engineering

An exploration of the Executable and Linkable Format (ELF) at the byte level, explaining segments, sections, and how programs load.

ELF files are everywhere: From your PS4, to the Wii, to any Linux device out there. In this video we explore the Extensible & Linkable Format, and understand how it works - on the byte level! Errata: - At the beginning I say extensible while displaying executable and linkable file format - Extensible is the old name, nowadays ist called Executable. Must’ve gotten confused :) Further reading: - The ELF specification: refspecs.linuxfoundation.org/elf/elf.pdf - elf.h from the Linux kernel: elixir.bootlin.com/linux/latest/source/include/uapi/linux/el… - How programs get run: lwn.net/Articles/631631/ - TLS: docs.oracle.com/cd/E19120-01/open.solaris/819-0690/chapter8-… - Relocation: refspecs.linuxbase.org/elf/gabi4+/ch4.reloc.html - sstrip: github.com/BR903/ELFkickers/ Timestamps: Intro segment and section differentiation ELF structure ELF header data structure Program header data structure Section header data structure

Why it's here

1 person recommends this

What people say. Recommended as an exceptionally clear and detailed explanation of the ELF file format.

u/mttdin r/ReverseEngineering • Recommends

In-depth: ELF - The Extensible & Linkable Format

u/GrossInsightfulnessin r/C_Programming • Mentions

On “Should I learn C instead of C++ if 'exe' file sizes are important to me? Scared by the 3MB "Hello World.exe" file size made by C++ :(”

I wouldn't worry about binary size yet, as an extra 3 MB doesn't matter if you're on desktop and doing everything else right. That being said, you might want to try Visual Studio since it's more native to Windows and it has a lot of stuff set up for you. You could also try using the Windows Subsystem for Linux or a Virtual Machine if you want to use g++ in its more natural environment, but your executables won't work outside of Linux environments. Here's a video explaining the Linux ELF (i.e. executable and dll) format, which is similar to how Windows does .exe files. If you want stupidly small binaries, you can also check out MattKC fitting a video game into a QR code.