[lld-macho] Only fold private-label aliases that do not have flags
This will enable us to re-land {D139069}. The issue with the original diff was that we were folding all private-label symbols. We were not merging the symbol flags during this folding; instead we just made all references to the folded symbol point to its aliasee. This caused some flags to be incorrectly discarded. This surfaced as code that was incorrectly stripped due to LLD dropping the `.no_dead_strip` flag. This diff fixes things by only folding flag-less private-label aliases. Most (maybe all) of the `ltmp<N>` symbols that are generated by the MC aarch64 backend are flag-less, so this conservative folding behavior does the job. Reviewed By: #lld-macho, thakis Differential Revision: https://reviews.llvm.org/D140606
Loading
Please sign in to comment