[PATCH] D87544: [CFGuard] Add address-taken IAT tables and delay-load support

Reid "Away June-Sep" Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 16 13:57:13 PDT 2020


rnk added inline comments.


================
Comment at: lld/COFF/Writer.cpp:1683
   uint32_t guardFlags = uint32_t(coff_guard_flags::CFInstrumented) |
                         uint32_t(coff_guard_flags::HasFidTable);
   if (config->guardCF == GuardCFLevel::Full)
----------------
Can we set either ProtectDelayLoadIAT or DelayLoadIATSection now, or does that take more work?


================
Comment at: lld/COFF/Writer.cpp:1762
+        if (s->isLive())
+          symbols.push_back(cast<Symbol>(s));
+      }
----------------
These two methods are essentially the same up until here. Your version seems more general. Can you rewrite markSymbolsForRVATable in terms of this utility? This code shouldn't be hot, I don't think we need to worry about the cost of an extra temporary vector of address-taken symbols.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87544



More information about the llvm-commits mailing list