[Driver] Default -fsanitize-address-globals-dead-stripping to true for ELF
-fsanitize-address-globals-dead-stripping is the default for non-ELF platforms. For ELF, we disabled it to work around an ancient gold 2.26 bug. However, some platforms (Fuchsia and PS) default the option to true. This patch changes -fsanitize-address-globals-dead-stripping to true for all ELF platforms. Without specifying -fdata-sections (non-default for most ELF platforms), `asan_globals` can only be GCed if the monolithic .data/.bss section is GCed, which makes it less effective. However, I think this simplified rule is better than making the -fsanitize-address-globals-dead-stripping default dependent on another option. Related: D120394 Close https://github.com/llvm/llvm-project/issues/63127 Reviewed By: #sanitizers, eugenis, phosek Differential Revision: https://reviews.llvm.org/D152604
Loading
Please sign in to comment