11 Commits
Author SHA1 Message Date
Clifford Yapp 16797b1845 Be more selective about when we print 2026-10-05 21:25:03 +00:00
Clifford Yapp d8fcc88660 Make ELF updates transactional
LIEF may fail to serialize an otherwise parseable ELF file, including when a replacement RUNPATH requires more dynamic-string storage.  Writing directly to the requested path could therefore truncate a working executable before verification detected the failure.

Write to a same-directory temporary file, preserve permissions, parse and verify the result, and only then atomically replace the original.  Failed updates now leave the input intact and remove temporary output.
2026-09-14 14:24:53 +00:00
Clifford Yapp e85f6c0547 Support expanding path forms, preserve file permissions 2026-06-30 23:14:49 -04:00
Clifford Yapp d3e4f226d9 Added writability and verification checks
- Added pre-write writability check before calling binfo->write(...).
- Added post-write verification by reparsing the modified ELF and confirming requested dynamic entries persisted.
- Verification now works with the current code paths, including selective RPATH append/prepend behavior.
- Reused soname_value for --print-soname so SONAME parsing is centralized.
2026-06-30 22:26:36 -04:00
Clifford Yapp fa0d7ac7fa Add update-only-if-needed support
If an RPATH is suitable already we may be able to skip rewriting the
binary, which saves work - adding options for that case.
2026-06-30 22:20:36 -04:00
Clifford Yapp a2ec7bd2d2 Add some options for batch processing 2026-06-30 01:53:58 -04:00
Clifford Yapp 0bc779cd20 Add the ability to alter the SONAME to plief 2026-04-30 13:12:50 -04:00
Clifford Yapp ff7abbe556 Update to reflect API changes in latest LIEF 2024-06-24 13:15:29 -04:00
Clifford Yapp f9e21cb453 Stick with basic LIEF config lookup 2024-05-08 15:22:28 -04:00
Clifford Yapp c6e407986f Stash FindLIEF.cmake - looks like the ubuntu version isn't compatible with plief right now, so this doesn't end up helping much. 2024-05-08 15:22:18 -04:00
Clifford Yapp 49f5c9e6f1 Initialize with current plief state
This program basically arose out of this issue:
https://github.com/lief-project/LIEF/issues/364

It's enough to do what BRL-CAD needs - currently it only exposes a small
fraction of the full potential of LIEF.
2023-09-16 22:39:27 -04:00