This is an archive of the discontinued LLVM Phabricator instance.

[Object] Move llvm-nm's symbol version utility to ELFObjectFile::readDynsymVersions
ClosedPublic

Authored by MaskRay on Aug 15 2021, 4:43 PM.

Details

Summary

The utility can be reused by llvm-objdump -T.

Diff Detail

Event Timeline

MaskRay created this revision.Aug 15 2021, 4:43 PM
MaskRay requested review of this revision.Aug 15 2021, 4:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 15 2021, 4:43 PM
jhenderson accepted this revision.Aug 16 2021, 4:31 AM

I've not looked too carefully to make sure the moved code is essentially the same before and after. I assume it is, and if so, LGTM. If not, please point out anything that's changed.

This revision is now accepted and ready to land.Aug 16 2021, 4:31 AM
MaskRay added a comment.EditedAug 16 2021, 9:36 AM

SymbolVersion has been replaced by VersionEntry defined in include/llvm/Object.

if (!VerSec)
  return std::vector<VersionEntry>();

has been added so that llvm-objdump can know whether the version sections exist or not. llvm-nm code already does if (!SymbolVersions.empty() ... so llvm-nm doesn't need a change.

Thanks. Sounds good.

This revision was landed with ongoing or failed builds.Aug 17 2021, 9:06 AM
This revision was automatically updated to reflect the committed changes.