[llvm] [ARM, ELF] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR #70014)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 10:12:11 PDT 2023


================
@@ -2019,7 +2019,9 @@ void TargetLoweringBase::insertSSPDeclarations(Module &M) const {
     if (M.getDirectAccessExternalData() &&
         !TM.getTargetTriple().isWindowsGNUEnvironment() &&
         !TM.getTargetTriple().isOSFreeBSD() &&
-        !TM.getTargetTriple().isOSDarwin())
+        (!TM.getTargetTriple().isOSDarwin() ||
+         (TM.getTargetTriple().isARM() &&
----------------
efriedma-quic wrote:

Does the current version of the patch actually change the logic for MachO targets outside of this change?  I can't find any logical differences (the ARMInstrInfo.cpp changes are guarded by isTargetELF(), and the ARMBaseInstrInfo.cpp change is unreachable due to an earlier isTargetMachO()).

https://github.com/llvm/llvm-project/pull/70014


More information about the llvm-commits mailing list