Module object::read::archive

source ยท
Expand description

Support for archive files.

ยงExample

use object::{Object, ObjectSection};
use std::error::Error;
use std::fs;

/// Reads an archive and displays the name of each member.
fn main() -> Result<(), Box<dyn Error>> {
   let data = fs::read("path/to/binary")?;
   let file = object::read::archive::ArchiveFile::parse(&*data)?;
   for member in file.members() {
       let member = member?;
       println!("{}", String::from_utf8_lossy(member.name()));
   }
   Ok(())
}

Structsยง

Enumsยง

Functionsยง

  • Digits are a decimal length of the extended name, which is contained in data at offset. Modifies offset and size to start after the extended name.
  • Digits are a decimal offset into the extended name table. Name is terminated by โ€œ/\nโ€ (for GNU) or a null byte (for COFF).
  • parse_u64_digits ๐Ÿ”’