[PATCH] D141172: [ModuleUtils][KCFI] Set patchable-function-prefix for synthesized functions
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 6 17:13:26 PST 2023
MaskRay accepted this revision.
MaskRay added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/lib/Transforms/Utils/ModuleUtils.cpp:169
+ unsigned Offset = MD->getZExtValue();
+ if (Offset)
+ F.addFnAttr("patchable-function-prefix", std::to_string(Offset));
----------------
`if (unsigned Offset = MD->getZExtValue())`
================
Comment at: llvm/test/Instrumentation/AddressSanitizer/kcfi-offset.ll:1
+;; Test that we set patchable-function-prefix for asan.module_ctor when kcfi-offset is defined.
+
----------------
`test/Transforms/KCFI/kcfi-patchable-function-prefix.ll` or a new file is perhaps a better place for this test. It's mainly about kcfi's requirement and less about asan.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141172/new/
https://reviews.llvm.org/D141172
More information about the cfe-commits
mailing list