adds zero-cost stack overflow protection to your embedded programs
flip-link
is known to work with ARM Cortex-M programs that link to version 0.6.x
of the cortex-m-rt
crate and are linked using the linker shipped with the Rust toolchain (LLD).
At this time, it hasn't been tested with other architectures or runtime crates.
flip-link
is available on crates.io. To install it, run
$ cargo install flip-link
Change the linker from rust-lld
(the default) to flip-link
in .cargo/config.toml
[target.'cfg(all(target_arch = "arm", target_os = "none"))']
# (..)
rustflags = [
"-C", "linker=flip-link", # <- add this
# (..)
]
NOTE that if you were using GNU ld
or GNU gcc
to link your program then this
won't work. Support for other linkers is being tracked in issue #1
flip-link
is part of the Knurling project, Ferrous Systems' effort at
improving tooling used to develop for embedded systems.
If you think that our work is useful, consider sponsoring it via GitHub Sponsors.
Licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.