Fixes PR32798.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
llvm/lib/Object/IRSymtab.cpp | ||
---|---|---|
166–168 ↗ | (On Diff #96779) | With this patch in place, do we still need the call to collectAsmUndefined in the ThinLTO backend? (I understand we need it for LTO, still) |
llvm/lib/Object/IRSymtab.cpp | ||
---|---|---|
166–168 ↗ | (On Diff #96779) | Good point. I actually think we can remove it from both because preventing internalization should be sufficient to keep the symbol alive. |
llvm/lib/Object/IRSymtab.cpp | ||
---|---|---|
166–168 ↗ | (On Diff #96779) | You probably already noticed, but there may be some test in lld that needs updating (so you can catch it before the bots start yelling). |
llvm/lib/Object/IRSymtab.cpp | ||
---|---|---|
166–168 ↗ | (On Diff #96779) | Yes, that was lld/test/ELF/lto/asmundef.ll, which I already updated :) |
The LTO bits look fine to me. I think this is also the correct fix for ThinLTO but Teresa should confirm
llvm/lib/Object/IRSymtab.cpp | ||
---|---|---|
166–168 ↗ | (On Diff #96779) | Oh, was looking at a stale revision. |
Won't this disable *linker* dead-stripping?
I don't understand the motivation for this change right now?
I don't think so. LTO will only internalize a global if the linker tells it that is not a GC root. This change disables internalization for some entities that would otherwise be internalized, but linker dead stripping is not inhibited because even if the symbol had external linkage, it would still not be a GC root.
I don't understand the motivation for this change right now?
See PR32798.