Crate compiledfiles

source ·
Expand description

compiledfiles

A library to get a list of all files that were used to compile the given binary.

This library currently only supports the following formats:

  • ELF files
  • PDB files

The following file formats are a work in progress

  • Mach-O files

This library currently only supports files generated by the following compilers:

  • GCC
  • LLVM
  • MSVC

This library currently only has been tested with the following languages:

  • C/C++

The following languages are a work in progress

  • Rust
  • Go

Help is welcome for supporting any future formats.

Examples

let elf_file = std::fs::File::open("path_to_binary").unwrap();
let files = compiledfiles::parse(elf_file).unwrap();
for file in files {
    println!("{:?}", file);
}

Structs

  • Basic information stored for each source file. Only the path is required.

Enums

  • Possible errors for attempting to list all sources
  • Checksum of the source file’s content

Functions

  • Parses out the source file information from a file
  • Parses out the source file information from a file at a given path