[libcxx-commits] [flang] [lldb] [libcxx] [lld] [clang-tools-extra] [clang] [llvm] [libclc] [compiler-rt] [libc] [libcxxabi] [Thumb, ELF] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR #78950)
Nick Desaulniers via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 22 12:35:13 PST 2024
================
@@ -135,14 +135,14 @@ void Thumb1InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
void Thumb1InstrInfo::expandLoadStackGuard(
MachineBasicBlock::iterator MI) const {
MachineFunction &MF = *MI->getParent()->getParent();
- const TargetMachine &TM = MF.getTarget();
const ARMSubtarget &ST = MF.getSubtarget<ARMSubtarget>();
+ const auto *GV = cast<GlobalValue>((*MI->memoperands_begin())->getValue());
assert(MF.getFunction().getParent()->getStackProtectorGuard() != "tls" &&
"TLS stack protector not supported for Thumb1 targets");
unsigned Instr;
- if (TM.isPositionIndependent())
+ if (!GV->isDSOLocal())
----------------
nickdesaulniers wrote:
does Thumb1 need similar guards for whether the target is elf?
https://github.com/llvm/llvm-project/pull/78950
More information about the libcxx-commits
mailing list