#binary #native #source #symbols #list #file #parse

compiledfiles

Parse native binary symbols for list of source files used to compile binary

8 releases (breaking)

0.8.0 Mar 14, 2023
0.7.0 May 26, 2022
0.6.0 Apr 28, 2021
0.5.0 May 16, 2020
0.1.0 Dec 15, 2019

#2613 in Parser implementations

Download history 46/week @ 2023-12-14 45/week @ 2023-12-21 34/week @ 2023-12-28 41/week @ 2024-01-04 46/week @ 2024-01-11 43/week @ 2024-01-18 43/week @ 2024-01-25 50/week @ 2024-02-01 48/week @ 2024-02-08 55/week @ 2024-02-15 95/week @ 2024-02-22 65/week @ 2024-02-29 71/week @ 2024-03-07 66/week @ 2024-03-14 60/week @ 2024-03-21 58/week @ 2024-03-28

261 downloads per month

MIT license

16KB
274 lines

CompiledFiles

Actions Status Rust Docs Crates.io Link

A rust library to return a list of all the source files listed in the symbols of a native compiled file.

For example, a simple main.c such as the following

include <stdio.h>

int main(int argc, const char* argv[]) {
    printf("Hello, World\n");
    return 0;
}

compiled with GCC, would return

  • /home/matt/dev/examples/simple_c/main.c
  • /usr/include/stdio.h
  • /usr/include/x86_64-linux-gnu/bits/types/FILE.h
  • /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h

Supported Systems

This library is cross platform, and can be used on a Windows, Linux, or Mac host. However, there are many tools that generate different symbols files and not all are currently supported.

Supported Compilers

The following compilers are currently supported:

  • GCC
  • MSVC
  • Clang

No versioning check has been done yet to ensure the symbol files they generate are compatiable across all versions.

Supported Languages

The only supported languages currently are C/C++ though other languages may just work. Due to the nature of this project, Rust is next on the list for support.

Supported Formats

The following symbol formats are currently supported

  • Elf
  • PDB

Mach-O files are next in line. Also, split dwarfs have not yet been tested.

Dependencies

~5.5MB
~110K SLoC