![]() |
VOOZH | about |
dotnet add package LibObjectFile --version 2.1.1
NuGet\Install-Package LibObjectFile -Version 2.1.1
<PackageReference Include="LibObjectFile" Version="2.1.1" />
<PackageVersion Include="LibObjectFile" Version="2.1.1" />Directory.Packages.props
<PackageReference Include="LibObjectFile" />Project file
paket add LibObjectFile --version 2.1.1
#r "nuget: LibObjectFile, 2.1.1"
#:package LibObjectFile@2.1.1
#addin nuget:?package=LibObjectFile&version=2.1.1Install as a Cake Addin
#tool nuget:?package=LibObjectFile&version=2.1.1Install as a Cake Tool
<img align="right" width="200px" height="200px" src="https://raw.githubusercontent.com/xoofx/LibObjectFile/master/img/libobjectfile.png">
LibObjectFile is a .NET library to read, manipulate and write linker and executable object files (e.g ELF, ar, DWARF, PE...)
NOTE: Currently LibObjectFile supports the following file format:
- PE image file format (Portable Executable / DLL)
- ELF object-file format
- DWARF debugging format (version 4)
- Archive
arfile format (Common, GNU and BSD variants)There is a longer term plan to support other file formats (e.g COFF, MACH-O, .lib) but as I don't have a need for them right now, it is left as an exercise for PR contributors! 😉
// Reads an ELF file
using var inStream = File.OpenRead("helloworld");
var elf = ElfFile.Read(inStream);
foreach(var section in elf.Sections)
{
Console.WriteLine(section.Name);
}
// Print the content of the ELF as readelf output
elf.Print(Console.Out);
// Write the ElfFile to another file on the disk
using var outStream = File.OpenWrite("helloworld2");
elf.Write(outStream);
ar file format including Common, GNU and BSD variants.System.IO.StreamPEFile.Relocate to relocate the image base of a PE filePEFile.Print to print the content of a PE file to a textual representationSystem.IO.StreamElfCustomSectionreadelf similar output.debug_info, .debug_line, .debug_aranges, .debug_abbrev and .debug_strnet8.0
netstandard2.1 support you will need to use 0.4.0 versionThe explains how the library is designed and can be used.
LibObjectFile is available as a NuGet package: 👁 NuGet
In order to build LibObjectFile, you need to have installed the .NET 8 SDK.
Running the tests require Ubuntu 22.04. dotnet test will work on Windows (via WSL) and on that version of Ubuntu.
If you're using macOS or another Linux, there's a Dockerfile and a helper script under src to run tests in the right OS version.
This software is released under the BSD-Clause 2 license.
Alexandre MUTEL aka xoofx
Supports this project with a monthly donation and help me continue improving it. [Become a supporter]
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on LibObjectFile:
| Package | Downloads |
|---|---|
|
Ahsoka.Core
Package Description |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.1 | 238 | 4/2/2026 |
| 2.1.0 | 8,299 | 8/28/2025 |
| 2.0.0 | 2,862 | 10/15/2024 |
| 1.1.1 | 261 | 10/13/2024 |
| 1.1.0 | 262 | 10/2/2024 |
| 1.0.0 | 291 | 10/1/2024 |
| 0.6.0 | 592 | 12/9/2023 |
| 0.5.0 | 355 | 10/14/2023 |
| 0.4.0 | 1,423 | 10/21/2022 |
| 0.3.6 | 899 | 3/6/2022 |
| 0.3.5 | 1,204 | 2/11/2020 |
| 0.3.4 | 755 | 1/4/2020 |
| 0.3.3 | 677 | 12/24/2019 |
| 0.3.2 | 738 | 12/22/2019 |
| 0.3.1 | 706 | 12/19/2019 |
| 0.3.0 | 721 | 12/18/2019 |
| 0.2.1 | 716 | 11/19/2019 |
| 0.2.0 | 702 | 11/17/2019 |
| 0.1.0 | 720 | 11/16/2019 |