llvm-project/llvm/lib/Transforms
Evgeniy Stepanov 6c3a8cbc4d [asan] Fix dead stripping of globals on Linux.
Use a combination of !associated, comdat, @llvm.compiler.used and
custom sections to allow dead stripping of globals and their asan
metadata. Sometimes.

Currently this works on LLD, which supports SHF_LINK_ORDER with
sh_link pointing to the associated section.

This also works on BFD, which seems to treat comdats as
all-or-nothing with respect to linker GC. There is a weird quirk
where the "first" global in each link is never GC-ed because of the
section symbols.

At this moment it does not work on Gold (as in the globals are never
stripped).

This is a re-land of r298158 rebased on D31358. This time,
asan.module_ctor is put in a comdat as well to avoid quadratic
behavior in Gold.

llvm-svn: 299697
2017-04-06 19:55:17 +00:00
..
Coroutines Rename AttributeSet to AttributeList 2017-03-21 16:57:19 +00:00
Hello Add auto-exporting of symbols from tools so that plugins work on Windows 2016-05-26 11:16:43 +00:00
IPO [asan] Fix dead stripping of globals on Linux. 2017-04-06 19:55:17 +00:00
InstCombine [InstCombine] Fix a case where we weren't checking that an instruction had a single use resulting in extra instructions being created. 2017-04-06 16:42:46 +00:00
Instrumentation [asan] Fix dead stripping of globals on Linux. 2017-04-06 19:55:17 +00:00
ObjCARC [ObjCArc] Do not dereference an invalidated iterator. 2017-04-05 03:44:09 +00:00
Scalar NewGVN: Rename some functions for consistency 2017-04-06 18:52:58 +00:00
Utils [asan] Fix dead stripping of globals on Linux. 2017-04-06 19:55:17 +00:00
Vectorize [LV] Transform truncations of non-primary induction variables 2017-03-27 20:07:38 +00:00
CMakeLists.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00
LLVMBuild.txt [coroutines] Part 3 of N: Adding Boilerplate for Coroutine Passes 2016-07-28 21:04:31 +00:00