[PATCH] D119296: KCFI sanitizer

Sami Tolvanen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 2 10:56:03 PDT 2022


samitolvanen added inline comments.


================
Comment at: lld/ELF/Symbols.cpp:553
+  // incompatible declarations for the same function.
+  if (isWeak() && getName().startswith("__kcfi_typeid_") &&
+      cast<Defined>(this)->value != other.value)
----------------
MaskRay wrote:
> This change looks like a hack.
I agree, this is not ideal. The request from LKML was to produce a warning when we link object files with different values for these weak symbols. What would be the best way to do this in LLD?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119296



More information about the cfe-commits mailing list