| Description: |
Textbook in PDF format
Focusing on the Executable and Linkable Format (ELF) used in Linux and Unix systems, this book explores how code is compiled, linked, and loaded into memory, and how the operating system executes it. You’ll learn to analyse ELF files, debug and optimize programs at the binary level, write custom linker scripts, and understand dynamic linking and symbol resolution.
ELF files are important because low-level programming and binary analysis are critical skills for system programmers, embedded developers, and security researchers. With the rise of performance optimization, cybersecurity, and resource-constrained environments (e.g., IoT), understanding executables is more relevant than ever.
Executable Files for Linux provides a hands-on, modern approach to a topic often overlooked in learning resources today.
Ever looked at your operating system and thought, “How the heck does this thing
actually run under the hood?” Yeah, that’s exactly what got me started on my journey
of building an OS. It’s a straight-up guide to rolling your own kernel from the ground
up, because nothing tops the rush of booting code you’ve written yourself, even if it
crashes in a blaze of glory. I’m Mohit Mishra, a total low-level programming nut who’s
spent years knee-deep in ELF files, dynamic linking, and binary debugging. This book
isn’t some dusty lecture from on high; it’s the raw, messy log of my own screwups and
breakthroughs, like battling page faults at 3 a.m. or tweaking interrupts until they finally
hum just right. My background is in systems programming. I have built open-source tools
for ELF binarybr /analysis, OS concepts, and reverse engineering. Those repositories have
attracted over abr /thousand stars and active contributors, which told me something I
did not expect: there are farbr /more developers curious about this topic than there are
good resources for learning it. That gapbr /is what this book addresses.br /I maintain
two technical blogs, The Core Dump and Chessman Profile and my Substack onebr
/(Low-Level Lore), where I write about low-level programming and compiler behavior
Сосредоточив внимание на исполняемом и связываемом формате (ELF), используемом в системах Linux и Unix, эта книга исследует, как код компилируется, связывается и загружается в память, и как операционная система выполняет его. Вы научитесь анализировать файлы ELF, отлаживать и оптимизировать программы на двоичном уровне, писать пользовательские сценарии компоновщика и понимать динамические связи и разрешение символов.
Файлы ELF важны, потому что низкоуровневое программирование и двоичный анализ являются критически важными навыками для системных программистов, разработчиков встраиваемых систем и исследователей безопасности. С ростом оптимизации производительности, кибербезопасности и ограниченных ресурсов (например, IoT) понимание исполняемых файлов становится более актуальным, чем когда-либо.
Исполняемые файлы для Linux обеспечивают практический, современный подход к теме, часто упускаемой из виду в учебных ресурсах сегодня.
Вы когда-нибудь смотрели на свою операционную систему и думали: "Как, черт возьми, это делает
на самом деле бегать под капотом?" Да, это именно то, что заставило меня начать свое путешествие
Это прямое руководство по качению собственного ядра с земли
вверх, потому что ничто не превышает пик загрузки кода, который вы написали сами, даже если он
падает в пламени славы. Я Мохит Мишра, полный низкоуровневый программист, который
провел годы по колено в файлах ELF, динамическом связывании и двоичной отладке. Эта книга
это не какая-то пыльная лекция с высоты; это сырой, грязный журнал моих собственных ошибок и
прорывы, такие как борьба с ошибками страницы в 3 часа ночи или настройка прерываний, пока они наконец не
гул просто прав. Мой опыт работы в области системного программирования. Я построил инструменты с открытым исходным кодом
для binarybr/анализа ELF, концепций ОС и обратного проектирования. Эти репозитории имеют
привлек более abr/тысяч звезд и активных участников, которые сказали мне то, что я
не ожидал: есть farbr/больше разработчиков, любопытных на эту тему, чем есть
хорошие ресурсы для его изучения. Что gapbr/то, что эта книга addresses.br/я поддерживаю
два технических блога, The Core Dump и Chessman Profile и мой Substack onebr
/ (Low-Level Lore), где пишу о низкоуровневом программировании и поведении компилятора
Introduction
Why Is My “Hello World” So Big?
ELF: Demystifying the Executable Format
Where Your C Code Lives: Understanding ELF Sections
Before main: The Secret Life of Global Variables in C
The Linker: Bringing Your C Code Together
Relocations: How the Linker Patches Your Code
Symbols: The Linker’s Address Book
Customizing the Layout: Introduction to Linker Scripts
Dynamic Linking in C: Shrinking Executables and Sharing Code
Lazy Loading: Dynamic Linking on Demand
Taking Control: Environment Variables for Dynamic Linking
Understanding Linux Executable Loading: A Deep Dive into Kernel Internals
Weak Symbols: A Linker’s Flexibility
Level Up Your C: Key Takeaways About Linking and Loading
|
Discussion