diff options
| author | Shoaib Meenai <smeenai@fb.com> | 2022-04-25 22:51:10 -0700 | 
|---|---|---|
| committer | Shoaib Meenai <smeenai@fb.com> | 2022-04-26 18:48:26 -0700 | 
| commit | 7cc328600e250ef44f86da34e93fcdd0635339e0 (patch) | |
| tree | 31fbe10b5a998d45b7748d7c1b3f1bef3d45345a /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h | |
| parent | c15ae0a37dda4a776d974dbe5360707163e34bda (diff) | |
| download | llvm-7cc328600e250ef44f86da34e93fcdd0635339e0.zip llvm-7cc328600e250ef44f86da34e93fcdd0635339e0.tar.gz llvm-7cc328600e250ef44f86da34e93fcdd0635339e0.tar.bz2 | |
[ELF] Prevent LTO stripping of wrapped script-referenced symbols
After 1af25a986069f2ae8c724133fa8649bb795a7925, 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
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedPythonInterface.h')
0 files changed, 0 insertions, 0 deletions
