[PATCH] D54723: [COFF] Add exported functions to gfids table for /guard:cf

Alex Gaynor via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 19 14:12:54 PST 2018


alex added a comment.

I don't know this code very well at all, so just one small comment that jumped out to me. Conceptually it looks like this solves the problem we were seeing. Thanks for jumping on this so quickly!



================
Comment at: lld/COFF/Writer.cpp:1371
   if (Config->Entry)
-    addSymbolToRVASet(AddressTakenSyms, cast<Defined>(Config->Entry));
+    maybeAddAddressTakenFunction(AddressTakenSyms, Config->Entry);
+
----------------
In the case where `Config->Entry` is a `Defined`, but not a `DefinedCOFF`, it won't get added with this patch, whereas it would have before. Can that situation happen?


https://reviews.llvm.org/D54723





More information about the llvm-commits mailing list