splat link yutility
Linker script generator
slinky is a linker script generator for modern GNU (ld
) and LLVM (lld
)
linkers. It aims to be resuable and general enough so it can be used in a
variety of projects
Its main purpose is to generate linker scripts for matching decompilation projects that use either of those linkers, allowing to still generate matching binary output but adding extra quality of life features.
Other linker script generators are functional and do their job, but can be rather limited or lack some features due to a number of reasons.
Two notable linker script generators on this context are splat
and mkldscript
(which lives inside the OoT decompilation repo
and the MM decompilation repo).
These two are great at their job but can be a bit annoying to work with when you
use them for their intended matching mindset. For example, mkldscript
doesn't
have many customization options besides what has been needed to produce matching
builds of the Zelda64 games, it uses a non-standard and non-documented file
format as input to describe the layout of the built ROM, and since it lives
inside the game's repo then other projects using it can get out of date quite
easily. splat
on the other side is a lot much more customizable and is a
Python library so it can be used by many different projects, but its main
purpose is as a binary splitting tool, meaning its input file describes the
binary blob that's meant to be splitted, making it hard to produce builds with
modified contents (add or remove files, move the memory layout, etc).
slinky aims to provide extra quality of life features on top of the features that other linker scripts offer, like a better modding support experience or extra shiftability features not present on other tools.
ld
and LLVM lld
.SUBALIGN
, align segments start and end, align
individual sections, etc..d
) files.splat
format and the
Makerom
format..a
) libraries support.
_gp
for small data support.KEEP
s attributes for file entries, allowing for a more
flexible link time garbage collection.All the planned features are added to the issue tracker. A full list can be seen here
Prebuilt binaries for the latest version of the CLI are available at the releases page on Github.
The CLI can also be installed system-wide using Rust's cargo
.
cargo install slinky-cli
To use the library itself as part of a Rust project then simply add it to your
project with cargo
.
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 1.X.X to 2.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.