pyelf2rel
Table of Contents
About
pyelf2rel is a tool / library for creation of files in Nintendo's GameCube/Wii REL format.
Alternatives
- ttyd-tools has a C++ implementation of ELF to REL conversion.
- ppcdis has a more specialised python implementation of the
conversion designed for matching decompilation.
- pyelf2rel is based off of this implementation and is more friendly for general use
Why make another elf2rel implementation?
- ttyd-tools is a bit awkward to build, requiring Visual Studio (or manual setup on Linux) and Boost
- Some legacy code requires specific fork builds of ttyd-tools elf2rel to work, all of those are supported by pyelf2rel
- Upstream support for linking against other rels
- Redirection of unlinked branches to _unresolved
- Control over which sections to include and strip
- This is easier to customise for projects to extend the format
- Some kind of built-in metadata extension may be coming at some point
makelst
Also included is the makelst tool, which can generate LST symbol maps based on global symbols in ELFs and existing LSTs, for use with this or ttyd-tools elf2rel.
Installation
Run the following command to install the package.
pip install pyelf2rel
You will now have access to the pyelf2rel and makelst commands (also the extra elf2rel command,
see below for information). Use each with -h for more information.
Using in place of ttyd-tools elf2rel
The tool provides an option for matching the API and behaviour (byte-matching output) of the
ttyd-tools elf2rel tool through the elf2rel command.
- For building projects requiring the
ELF2RELenvironment variable, set it equal toelf2rel - For building projects requiring the
TTYDTOOLSenvironment variable, set it equal toelf2rel -x
Multiple versions of the API and behaviour can be matched:
- Use
elf2rel [-x]to match the modern spm-rel-loader fork (elf2rel-21-12-2021)elf2rel-13-6-2022should function the same as this version other than the fact it supported using leading zeroes on the module id and section id without changing to octal - support for this quirk is not planned
- Use
elf2rel --old-fork [-x]to match the old spm-rel-loader fork (elf2rel-24-6-2021)- Notably, this includes support for the
offset:symbol?moduleId,sectionIdsyntax - Like in the old fork, fixed linking is unsafe for rels produced by this
- Support for the modern LST syntax isn't disabled while using this
- Notably, this includes support for the
- Both modes are supersets of the original ttyd-tools elf2rel, and should match the behaviour of it on projects which used it.
License
pyelf2rel is distributed under the terms of the MIT license.
Metadata
Release files for pyelf2rel 1.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pyelf2rel-1.0.9.tar.gz | 16.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyelf2rel-1.0.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.8 kB
Release files / pyelf2rel-1.0.9.tar.gz
| Download URL | pyelf2rel-1.0.9.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdd42f1a53ba2daa5b01281b64fc6055f0b7c559f6ec9aff12b846ac29b6411e
|
|
BLAKE2b-256 checksum How to use checksums |
d85cfa2187ccfe76df3edaa03c33e87f3b33b0d98530a8d6fb2328d4a3c13f36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.1
|
Release files / pyelf2rel-1.0.9-py3-none-any.whl
| Download URL | pyelf2rel-1.0.9-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54993d0dae7853818c62b16e66e30cb1ad1bb36e1674ad50098d6ac2f5bfa4ce
|
|
BLAKE2b-256 checksum How to use checksums |
7c6bda16d185affa06546d0049d20380b68de587fe2d534747b883f107bca2b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.11.1
|
Security for pyelf2rel 1.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.