
Elf is the executable and linkable format used by Linux for binaries, libraries, and kernel modules, supporting dynamic linking and position independent code across architectures and endianness.
Understand machine code and opcodes, the operation codes CPUs execute with operands in binary and hex. See how assembly and C are converted to machine code by a toolchain.
Explore the instruction set, including arithmetic operations such as addition, subtraction, multiplication, division, and bitwise operations. Compare ARM and x86 instruction sets, opcode patterns, and immediate operands across processors.
Learn to write an ARM assembly program that adds two numbers using registers in a bare-metal context, with .text directives, labels, and comments.
Relocation merges text and data sections and then places them at a chosen address, patching label references accordingly.
Learn to specify load and runtime addresses in the linker script for elf executables, using the at keyword to set the load address and copy data from flash to ram.
Explore what happens when you change the elf version number using a hex editor. The video demonstrates altering the version byte and observing an 'unknown' version in the executable.
Changing the elf header's architecture version demonstrates how readelf reports a mixed bitness, switching between x86_64 and i386, and can cause exec format errors when the header and code disagree.
Explore gcc options no start files and no stdlib, and see how startup code, underscore start, and library linking affect the absence of main and the C library runtime.
Construct a minimal elf header in C using elf.h, fill e_ident with magic numbers, set 64-bit little-endian amd64, and write a binary with no program or section headers.
Explore ELF structure by examining headers, sections, and segments. See how the section header and program header tables guide the linker and loader to merge sections and set up executables.
Explore the section header table in elf files, including names, types, flags, offsets, and sizes. Learn how the linker uses this information, and why the loader ignores it after generation.
Discover the common elf file sections, including the text section with executable code, the data and bss sections, section headers, and the interpreter, using objdump and readelf to inspect.
Explore how the strings command extracts printable characters from ELF and executable files, with -S and -D options to inspect sections, data, and symbol names for reverse engineering.
Explore how elf program headers map sections to memory, with segments containing multiple sections, types like load, interpreter, and dynamic, and permissions distinguishing text and data.
Learn how minimal assembly with nasm for Elf 64 directly invokes system calls to print hello, reducing size from 17 kb to 8.3 kb by avoiding libraries and trimming sections.
This comprehensive course will take you step-by-step through engaging video tutorials and teach you all the essential concepts and topics you need to understand about Linux Executable Format: ELF in Linux
ELF is the standard binary format for executables, object code, shared libraries, and core dumps on Unix-like operating systems. In this course, we unravel the intricacies of ELF, exploring its structure, sections, headers, and dynamic linking mechanisms.
What will you learn in this course
Learn the inner details of ELF file
Understand different stages of Compilation Process (Pre-processing, compiling, Assembling, Linking)
Understand what is machine code or operation code (opcode)
Write ARM assembly code and run on QEMU
Understand syntax of Assembly code (Label, instruction, comment, assembler directives)
Different sections: .text, .data, .bss
Viewing ARM Registers in QEMU Monitor Interface
Assembler directives (.byte, .asciiz, .ascii, .align, .global, .text, .data)
Viewing symbol table and understand symbol resolution
Understand the role of assembler and linker
Relocation operation performed by Linker (Section Merging and Section Placement)
What is a Linker Script and write a simple linker script file and use it while compiling
Run time addresses and Load time addresses
Creating sections from linker script
Writing a startup code for copying data into RAM, bss and initializing stack
Understanding ELF Header with readelf command
What happens if i change first byte of ELF file
Generate core dump and verify ELF Header
Understand different members of ELF Header
Changing different members of ELF Header
Understand who calls main() using gdb and _start()
Writing a ELF Header from C Code
Sections vs Segments
Linker and Loader view of ELF file
Different readelf commands (readelf -h , readelf -WS, readelf -Wl, readelf -a..)
Understand various fields of section header and program header
dumpelf command to dump ELF structures in C structure format
Write a C Code to print some fields of ELF Section Header
What happens when we compile a user space program with debugging information (-g) inside an ELF file
Use 'size' command to get size of text, data and bss sections
Get deeper understanding of symbol table and what happens when you run 'strip' command
Writing a very minimal ELF executable file with size less than 200KB
There's no risk either !
This course comes with a 30 day money back guaranteed!. If you are not satisfied with the course, you'll get your money back
So what are you waiting for, enroll now and take the next step in becoming an expert in ELF file format