[Object] Move llvm-nm's symbol version utility to ELFObjectFile::readDynsymVersions
authorFangrui Song <i@maskray.me>
Tue, 17 Aug 2021 16:06:39 +0000 (09:06 -0700)
committerFangrui Song <i@maskray.me>
Tue, 17 Aug 2021 16:06:39 +0000 (09:06 -0700)
commit78cb1adc5c17850e1a1b33f78f5657ca38493c8d
treeb3cd3d0ebd48cbd25dba0e3c4609814c2da78a80
parentb28cb53eac70b5044b5bd0fef77530fcc6b29fb0
[Object] Move llvm-nm's symbol version utility to ELFObjectFile::readDynsymVersions

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

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D108096
llvm/include/llvm/Object/ELFObjectFile.h
llvm/lib/Object/ELFObjectFile.cpp
llvm/tools/llvm-nm/llvm-nm.cpp