[PATCH] D142505: [ASan] Introduce a flag -asan-constructor-kind to control the generation of the Asan module constructor.
Usama Hameed via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 14:05:58 PST 2023
usama54321 created this revision.
Herald added subscribers: Enna1, hiraditya.
Herald added a project: All.
usama54321 updated this revision to Diff 491909.
usama54321 added a comment.
usama54321 added reviewers: kubamracek, yln, rsundahl, wrotki, thetruestblue.
usama54321 published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Removing unnecessary lint changes
By default, ASan generates an asan.module_ctor function that initializes asan and
registers the globals in the module. This function is added to the
@llvm.global_ctors array. Previously, there was no way to control the
generation of this function.
This patch adds a way to control the generation of this function. The
flag -asan-constructor-kind has two options:
global: This is the default option and the default behavior of ASan. It generates an
asan.module_ctor function.
none: This skips the generation of the asan.module_ctor function.
rdar://104448572
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D142505
Files:
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizer.h
llvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/no-global-ctors.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142505.491909.patch
Type: text/x-patch
Size: 10027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230124/1b25bcf7/attachment.bin>
More information about the llvm-commits
mailing list