mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 15:55:14 +00:00
Moves the header pieces of Craft Anything's crates/formats/src/elf.rs into a pure-Rust crate: the class/endian-aware reader, program_headers, ProgramHeader, dynamic_entries, va_to_off, and the segment type, permission and dynamic tag names. Mitigations, dynamic symbols, symbol versions and core-file notes stay in the app. Part of #778. Co-authored-by: BFlat <bombayapirat@gmail.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: GGWA <65288322+rech4210@users.noreply.github.com>
6 lines
236 B
Rust
6 lines
236 B
Rust
//! Addresses serialised as `0x…` strings, as Craft Anything reports them.
|
|
|
|
pub(crate) fn serialize<S: serde::Serializer>(value: &u64, serializer: S) -> Result<S::Ok, S::Error> {
|
|
serializer.serialize_str(&format!("{value:#x}"))
|
|
}
|