This is an archive of the discontinued LLVM Phabricator instance.

ELF: Move verneed tracking data structures out of VersionNeedSection.
ClosedPublic

Authored by pcc on Apr 4 2019, 10:51 PM.

Details

Summary

For partitions I intend to use the same set of version indexes in
each partition for simplicity. Since each partition will need its own
VersionNeedSection this will require moving the verneed tracking out of
VersionNeedSection. The way I've done this is to move most of the tracking
into SharedFile. What will eventually become the per-partition tracking
still lives in VersionNeedSection.

As a bonus the code gets a little simpler and more consistent with how we
handle verdef.

Depends on D60305

Event Timeline

pcc created this revision.Apr 4 2019, 10:51 PM
Herald added a project: Restricted Project. · View Herald Transcript
ruiu added inline comments.Apr 5 2019, 12:09 AM
lld/ELF/SyntheticSections.cpp
2796–2797

So the computed numbers start with one plus the number of versions in given version scripts, but it isn't easy to see that from the code. I'd write a comment.

pcc updated this revision to Diff 193944.Apr 5 2019, 12:53 PM
pcc marked an inline comment as done.
  • Add comment
ruiu accepted this revision.Apr 7 2019, 11:36 PM

LGTM

This revision is now accepted and ready to land.Apr 7 2019, 11:36 PM
This revision was automatically updated to reflect the committed changes.