LIEF Extended is an enhanced version of LIEF, providing additional features such as support for the Dyld shared cache, Objective-C metadata, PDB, and DWARF.
While the main version of LIEF focuses on providing support for ELF, PE, and Mach-O, LIEF Extended aims to provide functionality that was not originally intended for integration into the core LIEF project.
You can find the differences between the two versions in this table:
Module | Regular Version | Extended Version | Note |
|---|---|---|---|
Support based on LLVM [1] | |||
Support based on LLVM [1] | |||
Support based on romainthomas/iCDump | |||
Support based on LLVM [1] | |||
Support based on LLVM [1] |
To access the extended version, you must oauth-login with GitHub here: https://extended.lief.re/.
Once logged in, you can download the package of your choice (e.g., LIEF Extended - Python 3.10 for macOS arm64).
LIEF Extended uses a slightly different versioning scheme than regular LIEF packages.
First, every extended package is based on the current main branch of LIEF. If you need an (extended) build for a specific commit or tag, please contact extended@lief.re.
In Python, you can check the commit of LIEF being used in the extended version with:
# Make sure it's the extended version
$ python -c "import lief;print(lief.__extended__)"
# Print LIEF's main commit
$ python -c "import lief;print(lief.__LIEF_MAIN_COMMIT__)"
Additional features exposed by LIEF Extended are not always represented in a public commit while still being git-versioned. An incremental build number is used to represent internal changes not associated with a public commit.
For example, version 0.16.0.2380 includes 10 more commits than version 0.16.0.2370.
Python packages are delivered as a wheel for the required platform/version (e.g., lief_extended-0.16.0.post2370-cp312-cp312-win_amd64.whl).
You can install this wheel using pip in one of the following ways:
$ venv\Scripts\python.exe -m pip install C:\Users\tmp\lief_extended-0.16.0.post2370-cp312-cp312-win_amd64.whl
Or
$ venv\Scripts\python.exe -m pip install --find-links C:\Users\tmp\ lief_extended
You can verify that LIEF Extended is correctly installed with:
$ python -c "import lief;print(lief.__extended__)"
True
The C++ SDK is delivered as a .zip/.tar.gz archive containing:
A compiled shared library (libLIEF.so, LIEF.dll, libLIEF.dylib)
Header files
CMake helper files
Compared to the regular version, this SDK does not ship a static version of LIEF, and the shared library is compiled with all extended features.
Here is the layout for the macOS arm64 SDK, for example:
LIEF-extended-sdk-0.16.0.2378-Darwin-arm64/
lib/libLIEF.dylib
lib/cmake/LIEF/lief-extended-config-version.cmake
include/[...]
The Rust SDK is also delivered as a .zip/.tar.gz archive containing all the files needed for use with the LIEF_RUST_PRECOMPILED environment variable, as described in the Rust section.
Once the archive is extracted, you just have to set the LIEF_RUST_PRECOMPILED environment variable to the extracted path:
$ tar xzvf LIEF-extended-rust-0.16.0.2378-Linux-x86_64.tar.gz
LIEF-extended-rust-0.16.0.2378-Linux-x86_64/rs/
LIEF-extended-rust-0.16.0.2378-Linux-x86_64/rs/autocxx-autocxx_ffi-gen.rs
LIEF-extended-rust-0.16.0.2378-Linux-x86_64/lib/
LIEF-extended-rust-0.16.0.2378-Linux-x86_64/lib/libLIEF.so
LIEF-extended-rust-0.16.0.2378-Linux-x86_64/lib/liblief-sys.a
$ export LIEF_RUST_PRECOMPILED=$(pwd)/LIEF-extended-rust-0.16.0.2378-Linux-x86_64
You can then use all the extended features in Rust:
$ cargo build my-lief-extended-projet
LIEF Extended relies on LLVM for certain features, such as the disassembler and DWARF/PDB support.
The LLVM version used by LIEF is based on the upstream version and integrated into LIEF Extended so that users do not have to handle LLVM compilation or integration.
Note
LIEF is currently using LLVM 22.x.
Whenever possible and appropriate, bug fixes and enhancements have been submitted as PRs to the LLVM project: