[PATCH] D103100: [AIX] Enable stackprotect feature

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 25 11:42:52 PDT 2021


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16409
 
-// Override to disable global variable loading on Linux.
+#define AIX_SSP_CANARY_WORD "__ssp_canary_word"
+// Override to insert AIX canary word declaration.
----------------
Should this be a macro? A file-scope static `const char[]` will do.


================
Comment at: llvm/lib/Target/PowerPC/PPCISelLowering.cpp:16421
 
+Value *PPCTargetLowering::getSDagStackGuard(const Module &M) const {
+  if (Subtarget.isAIXABI())
----------------
There's a number of instances of hard-coded `"__stack_chk_guard"` in what appears to be common code, e.g., in `llvm/lib/Transforms/IPO/Internalize.cpp`. I think those fall within the scope of this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103100/new/

https://reviews.llvm.org/D103100



More information about the llvm-commits mailing list