Project Moved

Note: Ongoing development of libelf has moved to the Elftoolchain project on SourceForge.Net.

LibElf

LibElf is project implementing a BSD-licensed implementation of the SVR4 ELF(3) API. The scope of the project includes:

JosephKoshy is the developer working on this project.

Rationale

In the absence of a common API to read and manipulate ELF objects, many of FreeBSD's tools implement ad-hoc ELF parsers inside themselves.

FreeBSD tools which implement ad-hoc parsers include:

The downside of implementing ad-hoc ELF parsers is:

The use of a common ELF API alleviates these problems to some degree.

ELF Handling Alternatives

The GNU binutils toolset implements one such common API; the Binary File Descriptor library (-lbfd). The BFD library supports a very large range of cross-targets. However, its implementation is distributed under a restrictive license (GPL, not even LGPL), which makes it unsuitable for use in developing BSD-licensed tools.

The SVR4 ELF(3) API implements architecture-independent parsing of ELF files. While its scope is narrower than that of BFD, it fits FreeBSD's needs reasonably well. Apart from (Open)Solaris code, a small number of 3rd-party open-source applications use this API.

The ERTOS project's ELF library can also handle ELF files, but offers an API different from ELF(3).

The ELF(3) API

The ELF(3) API seems to have first appeared in SysV Unix (namely, SVR4), As the API evolved, it developed 32 and 64 bit variants. The GELF(3) sub-API was added to provide an ELF class-independent way of manipulating ELF files.

ELF(3) is currently in use in Solaris and other SVR4 derived systems. An LGPL-ed implementation of this API is present in some GNU operating systems.

Development

LibElf is being developed in FreeBSD's CVS repository.

Design notes are on a seperate page: LibElf/ImplementationNotes. A 'status' page is at: LibElf/ImplementationStatus.

LibElf based Tool Development

Native toolchain work is being tracked at ElfToolChain.

External Projects

The following people/projects are using FreeBSD's LibElf:

References


CategoryInactiveProject CategoryStale

LibElf (last edited 2021-04-25T04:05:23+0000 by MarkLinimon)