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. Doubts may be resolved by reading the Q&A section.
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
are now of type IReadOnlyList<>
(instead of the previously used IEnumerable<>
), 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.
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!
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
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:
- releasing policy has been changed;
- API has been changed siginificantly, the 32/64 bit differences should be much easier to handle now (at least I hope so);
- bug fixes and refactorings, as usual.
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). A new version can be downloaded here
The library development has just started and an initial push was made to GitHub.