forked from OSchip/llvm-project
![]() D130887 uses a dummy empty section `sanmd_covered` (with the SHF_GNU_RETAIN flag on ELF) to prevent `undefined symbol: __start_sanmd_covered` if all `sanmd_covered` are discarded by `ld --gc-sections` (in `-z start-stop-gc` mode). The dummy `sanmd_covered` does not have the SHF_LINK_ORDER flag, so mixing it with SHF_LINK_ORDER `sanmd_covered` causes an issue to GNU ld<2.36 (https://sourceware.org/bugzilla/show_bug.cgi?id=26256). Similar to D98903 for SanitizerCoverage, let's make encapsulation symbols undefined weak[1]. This additionally avoids size cost due to the dummy section and symbol. [1]: https://maskray.me/blog/2021-01-31-metadata-sections-comdat-and-shf-link-order Reviewed By: melver Differential Revision: https://reviews.llvm.org/D139276 |
||
---|---|---|
.. | ||
AddressSanitizer | ||
BoundsChecking | ||
DataFlowSanitizer | ||
HWAddressSanitizer | ||
HeapProfiler | ||
InstrOrderFile | ||
InstrProfiling | ||
JustMyCode | ||
MemorySanitizer | ||
PoisonChecking | ||
SanitizerBinaryMetadata | ||
SanitizerCoverage | ||
ThreadSanitizer | ||
cgprofile.ll |