This is an archive of the discontinued LLVM Phabricator instance.

[ELF] Drop unused original symbol after wrapping if not defined
ClosedPublic

Authored by smeenai on Apr 19 2022, 10:22 PM.

Details

Summary

We were previously only omitting the original of a wrapped symbol if it
was not used by an object file and undefined. We can tighten the second
condition to drop any symbol that isn't defined instead, which lets us
drop a previous check (added in https://reviews.llvm.org/D118756) that
was only covering some such symbols.

Diff Detail

Event Timeline

smeenai created this revision.Apr 19 2022, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 10:22 PM
smeenai requested review of this revision.Apr 19 2022, 10:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 19 2022, 10:22 PM
MaskRay accepted this revision.Apr 22 2022, 3:17 PM
MaskRay added inline comments.
lld/ELF/Driver.cpp
2182

The comment and code is from D118756. Mention it in the summary?

This revision is now accepted and ready to land.Apr 22 2022, 3:17 PM
smeenai edited the summary of this revision. (Show Details)Apr 22 2022, 3:41 PM
smeenai updated this revision to Diff 424646.Apr 22 2022, 3:53 PM
smeenai marked an inline comment as done.

Add comment about conditional

MaskRay accepted this revision.Apr 22 2022, 3:55 PM

Comments looks great. Thanks for investigating this area!