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.
If we are rejecting -fpic and -fpie, should we also check for -fPIC and -fPIE?