[PATCH] D31358: [asan] Put ctor/dtor in comdat.

Evgeniy Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 15:31:36 PDT 2017


eugenis created this revision.

When possible, put ASan ctor/dtor in comdat.

The only reason not to is global registration, which can be
TU-specific. This is not the case on win32, and also on ELF targets
when there are no instrumented globals.

The benefit of this is a lot less __asan_init() calls: one per DSO
instead of one per TU. It's also necessary for the upcoming
gc-sections-for-globals change on Linux, where multiple references to
section start symbols trigger quadratic behaviour in gold linker.


Repository:
  rL LLVM

https://reviews.llvm.org/D31358

Files:
  lib/Transforms/Instrumentation/AddressSanitizer.cpp
  test/Instrumentation/AddressSanitizer/basic-msvc64.ll
  test/Instrumentation/AddressSanitizer/instrument_global.ll
  test/Instrumentation/AddressSanitizer/no-globals.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31358.93016.patch
Type: text/x-patch
Size: 6766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170324/4af8b4cb/attachment.bin>


More information about the llvm-commits mailing list