This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] Teach ELFDumper about symbol versioning
ClosedPublic

Authored by davide on Oct 16 2015, 12:14 PM.

Details

Summary

This is needed by lld. In particular, almost each --version-script test will use this feature.
I think the code can be polished a little bit, maybe other info can be dumped, but I think this is enough to make progress.
I would appreciate if you can take a look.

Diff Detail

Repository
rL LLVM

Event Timeline

davide updated this revision to Diff 37624.Oct 16 2015, 12:14 PM
davide retitled this revision from to [llvm-readobj] Teach ELFDumper about symbol versioning.
davide updated this object.
davide added reviewers: rafael, echristo.
davide added a subscriber: llvm-commits.
emaste added a subscriber: emaste.Oct 16 2015, 12:49 PM
rafael accepted this revision.Oct 16 2015, 2:52 PM
rafael edited edge metadata.

LGTM with nits.

Gosh, this is a crazy format.

tools/llvm-readobj/ELFDumper.cpp
313 ↗(On Diff #37624)

With a helper function to dump just the symbol section you could use an early return :-)

342 ↗(On Diff #37624)

Same here.

366 ↗(On Diff #37624)

I think you can use just error.

This revision is now accepted and ready to land.Oct 16 2015, 2:52 PM
This revision was automatically updated to reflect the committed changes.