aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/InitPreprocessor.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2022-02-23 16:08:25 -0800
committerFangrui Song <i@maskray.me>2022-02-23 16:08:25 -0800
commit0477cac332d5abf7b2b51b470370afcbb1e8d513 (patch)
treefee6ef9cdbcc09a13a419cb1c556eb04fd3ab369 /clang/lib/Frontend/InitPreprocessor.cpp
parent454c149898d37b8e227f0d0347f7abd7ecc715e0 (diff)
downloadllvm-0477cac332d5abf7b2b51b470370afcbb1e8d513.zip
llvm-0477cac332d5abf7b2b51b470370afcbb1e8d513.tar.gz
llvm-0477cac332d5abf7b2b51b470370afcbb1e8d513.tar.bz2
[asan] Allow -fsanitize-address-globals-dead-stripping with -fno-data-sections for ELF
-fdata-sections decides whether global variables go into different sections. This is orthogonal to whether we place their metadata (`.data` or `asan_globals`) into different sections. With -fno-data-sections, `-fsanitize-address-globals-dead-stripping` can still: * deduplicate COMDAT `asan.module_ctor` and `asan.module_dtor` * (with ld --gc-sections): for a data section (e.g. `.data`), if all global variables defined relative to it are unreferenced, discard them and associated `asan_globals` sections (rare but no need to exclude this case) Similar to c7b90947bd0179d914fea56b52be545c8f60f20a for PE/COFF. Reviewed By: #sanitizers, kstoimenov, vitalybuka Differential Revision: https://reviews.llvm.org/D120394
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
0 files changed, 0 insertions, 0 deletions