Commit Graph

823 Commits

Author SHA1 Message Date
Romain Thomas 8da5388b94 pe: add address range checks for LoadConfiguration fields
Add VA range validation for all address fields in LoadConfiguration
that were previously unchecked. It validates that
each address falls within [imagebase, imagebase + virtual_size).
2026-03-20 18:00:41 +01:00
Romain Thomas 69219fdbe7 pe: add setters for iat_value/ilt_value 2026-03-20 16:27:47 +01:00
Romain Thomas f0610149b0 rust: add support for aarch64-linux-android and x86_64-linux-android 2026-03-20 15:56:35 +01:00
Romain Thomas d1382c1863 Bootstrap runtime options 2026-03-20 15:40:36 +01:00
lief-agent 35de7f3592 Improve testing log API 2026-03-19 17:08:49 +01:00
Romain Thomas 1502b48a17 Fix type hint 2026-03-19 09:25:39 +01:00
Romain Thomas 7ac083bb73 Add contextmanager API for log level 2026-03-19 07:56:02 +01:00
Romain Thomas 978dcc3b1a Fix pragma 2026-03-18 16:14:31 +01:00
Romain Thomas f986c6dd17 Resolve #1318 2026-03-17 17:11:44 +01:00
Romain Thomas cfdcc42fcd Fix warnings 2026-03-17 17:11:39 +01:00
Romain Thomas 22894bef5b clang-tidy fixes 2026-03-17 16:13:57 +01:00
Romain Thomas 702f4e51b8 Resolve #1310 2026-03-17 15:01:41 +01:00
Romain Thomas 6c2e39cfc0 modernize python API 2026-03-17 14:00:48 +01:00
Romain Thomas e1844d4ecc Add check_layout for ELF
This commit implements the check_layout function for ELF binaries
similar to PE and Mach-O. This function aims to ensure that the
ELF binary is consistent according to various loader (e.g., Linux, Android)
2026-03-17 08:30:21 +01:00
Romain Thomas 25dbebb658 Disable hash-opt by default 2026-03-16 11:48:59 +01:00
Frank 658297344b Add Rust bindings to modify PE imports and sections (#1317)
* Add set_name to PE Import

* Add creation and adding of PE Section

* Add functions to change Section

* Add docs for adding a section through Rust

* minor refactoring

---------

Co-authored-by: Romain Thomas <me@romainthomas.fr>
2026-03-16 09:58:51 +01:00
Frank cb71d0d640 Add Rust bindings to modify MachO libraries and paths (#1316)
* Add set_name to MachO Dylib

* Add rpaths to MachO Binary

* Add set_path to MachO RPath

* Add creation and adding of RPath

* Add remove_commands_by_type to MachO Binary

* Refactor LoadCommandTypes from_value to use From trait

* Add docs for new Rust bindings

* Fix code in documentation

* Some minor refactoring

---------

Co-authored-by: Romain Thomas <me@romainthomas.fr>
2026-03-16 09:50:26 +01:00
Romain Thomas 14f941bab4 optimize the ffigen process by running autocxx_build::Builder
only when `autocxx_ffi.rs` changed
2026-03-08 22:03:47 +01:00
Romain Thomas 2e94b01eb8 Force link against libpythonX.YZ.so on Android
It seems that Android does not support `undefined dynamic_lookup`
as we do for macOS and Linux. Therefore, we force link with the shared
library
2026-03-08 15:15:45 +01:00
Romain Thomas 3847142f1e add support to create a FAT MachO from binaries
Resolve: #1271
2026-03-08 14:10:57 +01:00
lief-agent 83bdf9c8d4 Add support for ELF DT_AUXILIARY and DT_FILTER
Resolve #1159
2026-03-08 11:33:50 +01:00
Romain Thomas 7f01c7e580 expose more functions 2026-03-08 11:29:55 +01:00
Charles Bousseau 63d5500ee7 Add TLSDESC_PLT and TLSDESC_GOT to ELF dynamic tags (#1311)
* Add TLSDESC_PLT and TLSDESC_GOT to ELF dynamic tags

---------

Co-authored-by: Romain Thomas <me@romainthomas.fr>
2026-03-07 20:57:50 +01:00
lief-agent cbf06a5033 update the documentation 2026-02-28 11:07:12 +01:00
Romain Thomas b4e355f532 Update the iterator interface to provide a hint on its length 2026-02-22 05:06:36 +01:00
Romain Thomas 0ab32ac170 ensures we correctly handle nullptr return value 2026-02-21 20:56:52 +01:00
Romain Thomas 61d2923941 Add logging macros 2026-02-21 18:52:54 +01:00
Romain Thomas 9f6c798506 Make stable ABI & free threading option aware of LIEF_STABLE_ABI/LIEF_FREE_THREADED 2026-02-21 18:22:37 +01:00
Romain Thomas 91bc6dfd6e Fix typo 2026-02-15 16:20:28 +01:00
Romain Thomas 007646df14 Initiate options to enable free-threaded build
Related to #1255
2026-02-15 16:13:43 +01:00
Romain Thomas bedb668860 Add option to enable the stable ABI 2026-02-15 11:54:25 +01:00
Romain Thomas d09a8d53cd Update nanobind 2026-02-15 11:54:14 +01:00
Romain Thomas d19b32f006 Fix version 2026-02-14 21:22:16 +01:00
Romain Thomas a0e7d68f3b Add support for using stable API 2026-02-14 21:21:09 +01:00
Romain Thomas e4ceecd6c4 Add support to insert an import at a specific position
close #1298
2026-02-14 11:09:22 +01:00
Romain Thomas 9c4204a358 Enhance API for MachO fileset
Fix #1297
2026-02-14 11:09:17 +01:00
Romain Thomas e46f1ded86 Refactor Rust macros 2026-02-14 11:09:11 +01:00
Romain Thomas f36b5a5410 Enhance testing 2026-02-14 11:09:05 +01:00
Romain Thomas 28d64ba71b initial support to generate C/C++ code from DWARF/PDB 2026-02-14 11:08:59 +01:00
Romain Thomas 64d13d63e6 enhance the API for PDB LF_ONEMETHOD 2026-02-14 11:08:50 +01:00
Romain Thomas 3b012a0a7f enhance API for PDB _simple_ types 2026-02-14 11:08:45 +01:00
Romain Thomas b19a17ee89 enhance API for PDB LF_ARRAY 2026-02-14 11:07:30 +01:00
Romain Thomas b5fd54aab4 enhance API for PDB LF_PROCEDURE 2026-02-14 11:07:24 +01:00
Romain Thomas f23d3bccd4 enhance API for PDB LF_ENUM 2026-02-14 11:06:19 +01:00
Romain Thomas a89d452efa Add API to access a PDB from its index 2026-02-14 10:55:28 +01:00
Romain Thomas b0502c94d0 Ghidra - Support DWARF generation for raw binaries/firmware
This commit introduces support for generating DWARF debug information
for binaries that LIEF cannot natively parse (e.g., raw firmware or unknown architectures).

Related to #1249
2026-02-14 10:55:23 +01:00
Romain Thomas 38e5565568 Abstract pdb::Type::{size, name} 2026-02-14 10:55:16 +01:00
Romain Thomas 71e6942309 Upgrade MbedTLS to 4.0.0
Updates the internal MbedTLS version from 3.6.4 to 4.0.0.
This major version introduces the TF-PSA-Crypto architecture,
requiring significant changes to the build system and internal API usage.

Added `src/mbedtls_wraps.h` to handle the internalization
of MbedTLS 4.0 structures. This file re-declares private contexts
(like `mbedtls_rsa_context`) and uses `-DMBEDTLS_DECLARE_PRIVATE_IDENTIFIERS`
to allow LIEF to inspect internal key parameters required for PE
signature verification.
2026-02-14 09:46:59 +01:00
Romain Thomas 66a54c6d92 Update deps
close #1295, #1294
2026-02-14 09:45:18 +01:00
Romain Thomas ac9b242a0b Update nanobind to 2.11.x 2026-02-01 13:01:25 +01:00