I’m not sure if this belongs here or perhaps in a different thread, but…
LLVM recently (early August) landed a patch that adds support for two PIC strategies that are important to bare-metal on ARM – RWPI and ROPI. While the patches are in master, they have not yet landed in a released version, however, making these PIC strategies available to rustc (eventually) would be a huge benefit to those of us doing embedded development on ARM.
The high-level summary of this patch is that it allows the GOT to be resolved from a reserved register (r9 by default) rather than from a fixed location or one encoded in the code segments. In turn, this means that the code and data segments can be located not-relative to each other, without knowing their locations ahead of time, and without rewriting the code segment and load time (which is important when code is in read-only(ish) flash). It’s equivilant (and I believe compatible) to -msingle-pic-base in GCC.
I would love to help push forward getting this into Rust.
What are the (non-technical) requirements to upgrade LLVM versions? It sounds like there needs to be emscripten support. Is it important for the upgrade to be based on a currently released version?
Conversely, is there a process in place for upgrading LLVM “eventually”, or is done ad-hoc, when there are useful features? If the latter, is there any interest in putting in a process to keep LLVM up to date?