Map file parser library focusing decompilation projects
Project description
mapfile_parser
Map file parser library focusing decompilation projects.
This library is available for Python3 and Rust
Features
- Fast parsing written in Rust.
- Support map formats:
- GNU ld
- clang lld
- Built-in cli utilities to process the parsed map file (see Examples).
Installing
Python version
See this package at https://pypi.org/project/mapfile_parser/.
The recommended way to install is using from the PyPi release, via pip
:
python3 -m pip install -U mapfile_parser
If you use a requirements.txt
file in your repository, then you can add
this library with the following line:
mapfile_parser>=2.7.1,<3.0.0
Development version
The unstable development version is located at the develop branch. PRs should be made into that branch instead of the main one.
The recommended way to install a locally cloned repo is by passing the -e
(editable) flag to pip
.
python3 -m pip install -e .
In case you want to mess with the latest development version without wanting to clone the repository, then you could use the following command:
python3 -m pip uninstall mapfile_parser
python3 -m pip install git+https://github.com/Decompollaborate/mapfile_parser.git@develop
NOTE: Installing the development version is not recommended unless you know what you are doing. Proceed at your own risk.
Rust version
See this crate at https://crates.io/crates/mapfile_parser.
To add this library to your project using Cargo:
cargo add mapfile_parser
Or add the following line manually to your Cargo.toml
file:
mapfile_parser = "2.7.1"
Versioning and changelog
This library follows Semantic Versioning. We try to always keep backwards compatibility, so no breaking changes should happen until a major release (i.e. jumping from 2.X.X to 3.0.0).
To see what changed on each release check either the CHANGELOG.md file or check the releases page on Github. You can also use this link to check the latest release.
Examples
Various cli examples are provided in the frontends folder. Most of them are re-implementations of already existing tools using this library to show how to use this library and inspire new ideas.
The list can be checked in runtime with python3 -m mapfile_parser --help
.
Each one of them can be executed with python3 -m mapfile_parser utilityname
,
for example python3 -m mapfile_parser pj64_syms
.
bss_check
: Check that globally visible bss has not been reordered.first_diff
: Find the first difference(s) between the built ROM and the base ROM.jsonify
: Converts a mapfile into a json format.pj64_syms
: Produce a PJ64 compatible symbol map.progress
: Computes current progress of the matched functions. Relies on a splat folder structure and each matched functions no longer having an.s
file (i.e: delete the file after matching it).sym_info
: Display various information about a symbol or address.symbol_sizes_csv
: Produces a csv summarizing the files sizes by parsing a map file.upload_frogress
: Uploads current progress (calculated by theprogress
utility) of the matched functions to frogress.
None of the provided cli utilities are meant to be used directly on a command line, because they need a large number of long parameters to them and every repo has their own quirks which would need them to be adapted. Those have been written mostly to facilitate people to write those utilities in a way which accomodates their own repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file mapfile_parser-2.7.1.tar.gz
.
File metadata
- Download URL: mapfile_parser-2.7.1.tar.gz
- Upload date:
- Size: 46.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c33001b0d4e948cf715be5161ad70bcf0339bcb52d50921e503605e9dd9baa3 |
|
MD5 | bc7b060f2d27f0e4a12eb3c8eecd871c |
|
BLAKE2b-256 | c22e23106988dd09b65383f940eae037ef77300b5263c2c0f5f2736521acd491 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 906.0 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82b72def8c1be33f6c0ba3f15f4583665a90010330c0087e956e9404ee7f7388 |
|
MD5 | 0e20851d4ee42092fa509343abba28ac |
|
BLAKE2b-256 | f24c90d04f89ab752a99ed56b11dce1a1f71a643c39b3da7ab52ce3e376e8eac |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-win32.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-win32.whl
- Upload date:
- Size: 819.0 kB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfe52185b07634a56d7b91e695456c0886e9155150c54dab153dddc239a82eb8 |
|
MD5 | 48ce560d0de6a4a805b1a00e109902a2 |
|
BLAKE2b-256 | f6fe74dace5819359a052f610e0a272808279751710c5560b850cbdb21613720 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd3b4f340c6ba0da4bc3991b8d8956204876c024604ec0e3dfaf78d42c214414 |
|
MD5 | e127ed86bc77c5d6fc52ca85778a721f |
|
BLAKE2b-256 | 58b3c06348a856584beb0b4ba9157704dcffb90cfcc80a9b556b81018651e600 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a7a9b6b9698cf471e07e8b41ea34a83878a6d5a93ec2784774908be8c471b13 |
|
MD5 | 09fd9a22a81150fb6f61687995984058 |
|
BLAKE2b-256 | ea7218ae1dceecda2151b9b8ab618a5e48df58a4d7801cedb8b5a634b2725407 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dcee6fe0c585ef13bcd12461f21667e013da8b9eb43f3204420a9ae191d43e1 |
|
MD5 | 29dbc322859823d023b9c496b0e4ff3d |
|
BLAKE2b-256 | 6ef9469611b8379a746c508ef4fddbaebc720426d2089c6b92334c6867334441 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30d179ea6d8ee3a3f1ff224a52b67a10b9c82d4b5251e715f62af4b7e155a5f |
|
MD5 | 3d3768a3712271b417df7b5b8dfc1890 |
|
BLAKE2b-256 | 897b003d30081a73e9c5ce8aa9668ee2e189791cf25d2e56667d57953253c7dd |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cdac156ab0dfca55f69f54669a344ccbdd6f926a9c9599dad66ed971a9361f8 |
|
MD5 | 1626acb86b82ff4b23e4f3aca7ab2089 |
|
BLAKE2b-256 | 6fbe350b670d1b368e142d96ee869de5181f67726e626e569aeb136d77e804b3 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb3255e20e24679a6a8137dbfe266d4b4a3f0830f5d5efea49da690cbcbfd52c |
|
MD5 | 2b227fd45edddadc2b27d3d07dcfa052 |
|
BLAKE2b-256 | 46b5591292744b26909d1ef9f97411f41c2c2f9e57547b4792f7d5c4b9269a80 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 992.4 kB
- Tags: CPython 3.7+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28598c01214113c53474ac651eb5dba2b871ce0148cddee87385b49f505a16a8 |
|
MD5 | cb8d33a6b63b56464a528ba3eaa2bcc0 |
|
BLAKE2b-256 | e792b12860aee05c4e3d96ca50bb64781eb4f06502c00de695aa0b79a5d47522 |
File details
Details for the file mapfile_parser-2.7.1-cp37-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: mapfile_parser-2.7.1-cp37-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.7+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a24b4dcb9ed1916430e6a411e5501f86bfbdc09b8e7d4c37cf7b9be8b723d4f |
|
MD5 | b3a1bffee62fb14e96d8fe90da41749f |
|
BLAKE2b-256 | b6c743796a8dc21b203edeb437c73070f2ba866e76d54d40641d79eb9180b14f |