[Object, llvm-readelf] - Move the API for retrieving symbol versions to ELF.h
authorGeorgii Rymar <grimar@accesssoftek.com>
Fri, 15 Jan 2021 11:21:00 +0000 (14:21 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Mon, 18 Jan 2021 09:50:29 +0000 (12:50 +0300)
commitb9ce772b8fb5d02afd026c9b029f5d53d1ea9591
treee257933e7ee37d1c77ff4e0934ee573506c1dc80
parentf446fc5acf88fda676b5df1c04838f7244201d20
[Object, llvm-readelf] - Move the API for retrieving symbol versions to ELF.h

`ELFDumper.cpp` implements the functionality that allows to get symbol versions.
It is used for dumping versioned symbols.

This helps to implement https://bugs.llvm.org/show_bug.cgi?id=48670 ("make llvm-nm -D print version names"):
we can move out and reuse the code from `ELFDumper.cpp`.
This is what this patch do: it moves the related functionality to `ELFFile<ELFT>`.

Differential revision: https://reviews.llvm.org/D94771
llvm/include/llvm/Object/ELF.h
llvm/test/tools/llvm-readobj/ELF/verdef-invalid.test
llvm/test/tools/llvm-readobj/ELF/verneed-invalid.test
llvm/tools/llvm-readobj/ELFDumper.cpp