[all-commits] [llvm/llvm-project] acc5db: [Thumb1] Do not allow Armv6-m XO and PI code
walkerkd via All-commits
all-commits at lists.llvm.org
Tue Aug 22 03:09:56 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: acc5db2bedd50a66f156b63be8469271f7b19322
https://github.com/llvm/llvm-project/commit/acc5db2bedd50a66f156b63be8469271f7b19322
Author: Keith Walker <keith.walker at arm.com>
Date: 2023-08-22 (Tue, 22 Aug 2023)
Changed paths:
M clang/include/clang/Basic/DiagnosticCommonKinds.td
M clang/lib/Driver/ToolChains/Arch/ARM.cpp
M clang/test/Driver/arm-execute-only.c
Log Message:
-----------
[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
More information about the All-commits
mailing list