diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2024-10-09 18:34:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-09 09:34:17 -0700 |
commit | 2e47b93fd29ad6ef13a4134f3b0be3c42e91180c (patch) | |
tree | 4c0690c3f862d60374a3e5fb18c42397a69a845a /clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp | |
parent | 18952bdcd6f987620e6396261c2bb444e428e07e (diff) | |
download | llvm-2e47b93fd29ad6ef13a4134f3b0be3c42e91180c.zip llvm-2e47b93fd29ad6ef13a4134f3b0be3c42e91180c.tar.gz llvm-2e47b93fd29ad6ef13a4134f3b0be3c42e91180c.tar.bz2 |
[ARM] Honour -mno-movt in stack protector handling (#109022)
When -mno-movt is passed to Clang, the ARM codegen correctly avoids
movt/movw pairs to take the address of __stack_chk_guard in the stack
protector code emitted into the function pro- and epilogues. However,
the Thumb2 codegen fails to do so, and happily emits movw/movt pairs
unless it is generating an ELF binary and the symbol might be in a
different DSO. Let's incorporate a check for useMovt() in the logic
here, so movt/movw are never emitted when -mno-movt is specified.
Suggestions welcome for how/where to add a test case for this.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions