[RFC][ARM] Add support for embedded position-independent code (ROPI/RWPI)

Has anything progressed with this? We would also like to use this to help dynamically load applications on an embedded platform.
We're currently doing this with GCC, which has exactly this functionality in the form of -msingle-pic-base -mno-pic-data-is-text-relative, but we'd prefer to switch back to LLVM, in particular because it would allow us to support higher level languages that use LLVM.

I'm happy to help test this patch on some real code if that would help.


>/On 4 December 2015 at 05:46, Oliver Stannard via llvm-dev /> >/<llvm-dev at lists.llvm.org

<http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev&gt;&gt; wrote: /> >/> SysV-style PIC solves this by having the dynamic linker fix up any /> >/> relocations on the data segment. Since these modes are trying to avoid /> >/> the need for a dynamic linker, we instead have the compiler emit code to /> >/> initialise these variables at startup time. These initiailisers are /> >/> expected to be rare, so the dynamic initiaslisers will be smaller than /> >/> the equivalent dynamic linker plus relocation and symbol tables. /> >//> >/What does armcc do here? It's been a while but I thought it was part /> >/of the scatter-loading initialisation, with some kind of compressed /> >/representation in the final linked image. />