[Thumb1] Do not allow Armv6-m XO and PI code
When generating armv6-m (Thumb1) Position Independent (PI) code
there are currently some code sequences that are not compatible
with eXecute-Only (XO) code.
For example, this simple code sequence when compiler for XO & PI:
extern int x;
int fn() { return x; }
is a problem as the address of x is currently loaded by:
ldr r0, .L0
:
:
.L0:
.long x
which is not XO compiant as this involves reading the value at
.L0 which is in the code section. Generating correct code is
currently hindered by lack of suitable relocations.
Disallow the generation of armv6-m PI code together with XO code
until they can be made to work together.
Differential Revision: https://reviews.llvm.org/D157620
parent
31a8f840
Please register or sign in to comment