Libelf by Example

A tutorial introduction to the ELF(3) & GELF(3) APIs

by Joseph Koshy

DescriptionTable of ContentsDetailsHashtagsReport an issue

Book Description

This tutorial introduces libelf, a library for reading and writing object code in the Extensible Linking Format (ELF) file format.
- Getting started with libelf: obtaining a handle to an ELF object, establishing a working ELF version, and handling errors reported by libelf.
- How ELF data structures are laid out in-memory and on disk, the notions of "file representation" and "memory representation", how to write applications that can handle non-native binaries.
- ELF Segments and the ELF Program Header Table, retrieving the program header table from an ELF executable and the meaning of the fields of a program header table entry.
- How data is stored inside ELF sections, the ELF Section Header Table, and how to traverse the sections in an ELF object.
- How to create new ELF objects: the rules for ordering individual API calls, the default object layout implemented by libelf, and how to specify custom layouts.
- ar archives: their structure, and how to read the contents of these archives using the APIs provided by libelf.

The example programs in this tutorial are written in the C programming language.

While written for the libelf implementation that is part of the Elftoolchain open-source project, this tutorial is expected to be compatible with other libelf implementations, such as that offered by the GNU project.

This open book is licensed under a Open Publication License (OPL). You can download Libelf by Example ebook for free in PDF format (1.1 MB).

Table of Contents

Chapter 1
Chapter 2
Getting Started
Chapter 3
Peering Inside an ELF Object
Chapter 4
Examining the Program Header Table
Chapter 5
Looking at Sections
Chapter 6
Creating New ELF Objects
Chapter 7
Processing ar archives
Chapter 8

Book Details

Computer Science
PDF Size
1.1 MB
Open Publication License

Book Hashtags

Related Books

R Notes for Professionals
The R Notes for Professionals book is compiled from Stack Overflow Documentation, the content is written by the beautiful people at Stack Overflow....
Mergers and Alliances in Higher Education
Higher education in Europe and beyond faces a series of major challenges. The economic crisis has accelerated expectations of an increased role in addressing economic and societal challenges while, at the same time, putting pressure on available finances. Broader trends such as shifting student demographics and expectations, globalisation and mobil...
Programming Persistent Memory
Beginning and experienced programmers will use this comprehensive guide to persistent memory programming. You will understand how persistent memory brings together several new software/hardware requirements, and offers great promise for better performance and faster application startup times - a huge leap forward in byte-addressable capacity compar...
SAT/SMT by Example
SAT/SMT solvers can be viewed as solvers of huge systems of equations. The difference is that SMT solvers takes systems in arbitrary format, while SAT solvers are limited to boolean equations in CNF 1 form. A lot of real world problems can be represented as problems of solving system of equations....
Control Theory Tutorial
This open access brief introduces the basic principles of control theory in a concise self-study guide. It complements the classic texts by emphasizing the simple conceptual unity of the subject. A novice can quickly see how and why the different parts fit together. The concepts build slowly and naturally one after another, until the reader soon ha...
Learning Neo4j
Neo4j is the world's leading graph database and offers users a radical new way of dealing with connected data. This book has been created to help you get to grips with it, providing you with an accessible route through a tool built to contend with the complexity of modern data. Learn the fundamental concepts behind Neo4j, and put them into practice...