Files
clang-p2996/lld/test/ELF
Shoaib Meenai 7cc328600e [ELF] Prevent LTO stripping of wrapped script-referenced symbols
After 1af25a9860, we stop unconditionally
retaining wrapped symbols, which means that LTO's summary-based global
dead stripping can eliminate them even if they'll be referenced by a
linker script after the wrapping is performed. Mark symbols referenced
in linker scripts as `referenced` in addition to `isUsedInRegularObj`,
so that the wrapping logic correctly sets `referencedAfterWrap` for the
symbols which will be referenced after wrapping, which will prevent LTO
from eliminating them.

An alternative would have been to change the `referencedAfterWrap` logic
to look at `isUsedInRegularObj` in addition to `referenced`, but
`isUsedInRegularObj` is also set in other places (e.g. for the entry
symbol), and it's not clear that we want `referencedAfterWrap` to take
all those places into account, so it seemed better to keep that logic
as-is and instead set `referenced` for linker script-referenced symbols.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D124433
2022-04-26 18:48:26 -07:00
..
2021-02-08 08:55:29 -08:00
2021-02-08 08:55:29 -08:00
2021-02-08 08:55:29 -08:00
2021-02-08 08:55:29 -08:00
2021-02-08 08:55:29 -08:00
2021-10-31 12:10:43 -07:00
2022-02-23 13:29:21 -08:00
2021-01-22 19:07:02 -08:00
2021-10-04 11:10:10 +01:00
2021-10-04 11:10:10 +01:00
2021-10-04 11:10:10 +01:00
2021-10-04 11:10:10 +01:00
2021-02-05 09:37:37 -08:00
2022-01-15 22:33:51 -08:00
2022-01-15 22:33:51 -08:00
2022-01-29 14:45:58 -08:00
2021-10-31 12:10:43 -07:00
2021-10-31 12:10:43 -07:00