This is ELFSharp by Konrad KruczyĆski (and other authors), a C# library for reading ELF, UImage and Mach-O files. It is an open source software available on a permissive X11 license and hosted on GitHub. For obtaining the binary or getting the source code please visit the download page. You can learn how to use this library by visiting the examples section
ELFSharp 2.17.3 released. Fixed magic value for the x64 BE Mach-O binary.
ELFSharp 2.17.2 released. Fixed reading LC_UUID command.
ELFSharp 2.17.1 released. Fixed another edge case regarding SHN_LORESERVE
and string table index.
ELFSharp 2.17 released. Added a command to parse LC_UUID and ability to get the UUID (for Mach-O files, obviously).
ELFSharp 2.16.1 released. Fixes leaving open stream on ELF loading if it is owned and loading fails.
ELFSharp 2.16 released. Adds support for multi-file uImage binaries, popular solution for joining e.g. Linux kernel and an FDT describing platform.
ELFSharp 2.15.2 released. Fixes a bug in which an ELF binary with sections count greater than SHN_LORESERVE
and containg string table could not be read.
ELFSharp 2.15.1 released. Fixes a bug in which number of sections in ELF file was incorrectly read in case it was larger than SHN_LORESERVE
.
ELFSharp 2.15 released. Multiple notes are now available in the NoteSegment
. First note is still available via old API for backwards compatibility.
ELFSharp 2.14 released. Fixes the bug of incorrect interpretation of the value of shouldOwnStream
parameter in Mach-O binaries. Also adds useful constraint on what is expected from GetCommandsOfType<T>
(commands, naturally) and Mach-O symbol now knows to which section it belongs.
ELFSharp 2.13.3 released. This is just a technical release, since the binaries are identical. The only difference is in the package itself, now having proper license keyword.
ELFSharp 2.13.2 released. Fixed a bug when reading a NOBITS ELF section.
ELFSharp 2.13.1 released. Fixed a bug when 64-bit big-endian Mach-O files were treated as 32-bit.
ELFSharp 2.13 released. Added Mach-O file flags.
ELFSharp 2.12.1 released. Fixes a InvalidOperationException
when parsing intermediate object file.
The ELFSharp webpage is now statically generated using Statiq.Web, all subpages should be working fine now (previously only the news page was available).
ELFSharp 2.12 released. Four new MachO commands are now available: LC_ID_DYLIB
, LC_LOAD_DYLIB
, LC_LOAD_WEAK_DYLIB
and LC_REEXPORT_DYLIB
. Also a CHANGELOG
file was introduced, documenting all the changes using the format based on Keep a changelog.
ELFSharp 2.11.0 released. Fat Mach-O binaries are handled from now.
ELFSharp 2.10.0 released. The library now provides symbol visibility in symbol table.
ELFSharp 2.9.0 released. The library now supports big endian Mach-O files.
ELFSharp 2.8.1 released. Offset parsing issue in MachO is now fixed, also data type of some properties was changed to a proper (unsigned) one.
ELFSharp 2.8.0 released. NOTE segment is now handled by the library. This is a different animal than NOTE section, altough having the same internal structure.
ELFSharp 2.7.0 released. Now stream overleads are available also for Mach-O and UImage.
ELFSharp 2.6.1 released. This fixes a regression that happened during addition of stream reading feature. It resulted in corrupted contents of the sections and should now be fixed.
ELFSharp 2.6.0 released. The library now targets .NET Standard 2.0 only.
ELFSharp 2.5.0 released. Properties Sections
and Segments
are now of type IReadOnlyList<T>
(instead of the previously used IEnumerable<T>
), so that one can easily check their count or access them by a numeric index.
ELFSharp 2.4.0 released. ELFReader now offers new overloads that let you read ELF directly from stream, instead from a file only. Therefore one is able to use e.g. MemoryStream directly. Note that the stream have to be seekable in order to be properly read.
ELFSharp 2.3.0 released. Basic .dynamic section parsing was added.
ELFSharp 2.2.1 released. This version is able to open files with a dynamic string table being a NOBITS
section. I wasn't able to find a part of the ELF specification that allows that, but apparently such binaries exists in the wild.
ELFSharp 2.2 released. This version is able to silently ignore non-conforming note section.
ELFSharp 2.1.1 released. This release fixes getting memory contents of a segment when memory size is greater than file size.
ulong
instead of long
is now used as a generic type for 64-bit ELF files, which resolves a bug. This is, however, an API breaking change so - according to semantic versioning - I have to bump the major version number. ELFSharp 2.0 is therefore released.
ELFSharp 1.3 released. With this version, when getting segment contents, you should use one of the two new functions, to get either contents as it was written in the file, or as it should be loaded into memory. Old function is still there and works, but since its name is now misleading, it was turned obsolete.
ELFSharp 1.2 is the first version that does not use MiscUtil internally.
ELFSharp is now a .NET Standard 2.0 library. Also tests were updated and they are again available in the main repository. This is released on NuGet - version 1.1. Also - because of that - MiscUtil parts are directly embedded as it used to be some time ago (no MiscUtil for .NET Standard 2.0), but I plan to rewrite endianess related parts of the code, so they should soon be removed from the project.
The offset of a segment is now public.
Strongly named assembly is now available.
New version of ELFSharp is available. From this version on I will not longer offer a binary to download. This is because I removed inlined MiscUtil library sources in favor of having the library as a NuGet dependency. I've also started using different pattern of versioning. Last but not least - basic Mach-O support is now there. Enjoy!
New ELFSharp available, with some fixes regarding strings handling (we use UTF-8 now).
New version of ELFSharp available, with a method to try getting section and some fixes. You can also get it from NuGet.
New version of ELFSharp, with UImage support! 0.0.10 is already available for download, I'll soon put it on nuget gallery.
New version of ELFSharp released, namely 0.0.9. Bug fixes, tests fixed and new API for testing whether file is an ELF (and of which class) file added.
New release with examples upgraded.
ELFSharp is now available as a package on nuget.org with the (not surprising) id ELFSharp
.
The new version of ELFSharp (0.0.5, precisely speaking) was just released. There was some cleanup in code, minor fixes, but, what is most important, two subnamespaces were introduced: Sections and Segments. Their purpose should be self describing ;)
Some new stuff:
ELFSharp can be now used to read the NOTE section.
Today's release contains some important bug fixes. Also missing fields for section and program header were added.
Library is now able to explore 64-bit ELFs. Enjoy!
Using the library, you can now explore program headers and get program images from file.
The library should now work properly with non-native endianess (which usually means big endian).
The library development has just started and an initial push was made to GitHub.