This is an archive of the discontinued LLVM Phabricator instance.

[lld] Reapply "[ELF] Only mark as DT_NEEDED libs that are strictly necessary"
ClosedPublic

Authored by rafaelauler on Oct 9 2014, 2:53 PM.

Details

Summary

When committed in r219353, this patch originally caused problems because I have had only tested it using an optimized build. However, in debug builds, LLD (in Driver.cpp) adds two additional passes that serializes all atoms via YAML and reads it back. Since I have changed ObjectAtom to hold a new reference, the serialization was removing the extra data.

I decided to implement this in another way, similar to the original MIPS way, by using a StringSet that holds the names of all copied atoms instead of directly holding a reference to the copied atom. In this way, I simplify this patch and eliminate the necessity of changing the DefinedAtom hierarchy to hold a new data.

Diff Detail

Event Timeline

rafaelauler updated this revision to Diff 14679.Oct 9 2014, 2:53 PM
rafaelauler retitled this revision from to [lld] Reapply "[ELF] Only mark as DT_NEEDED libs that are strictly necessary".
rafaelauler updated this object.
rafaelauler edited the test plan for this revision. (Show Details)
rafaelauler added subscribers: Unknown Object (MLST), rafael, emaste.
shankarke accepted this revision.Oct 9 2014, 2:56 PM
shankarke edited edge metadata.
This revision is now accepted and ready to land.Oct 9 2014, 2:56 PM
rafaelauler closed this revision.Oct 9 2014, 3:17 PM

Thanks Shankar. Committed r219449.