[llvm-readelf]Merge dynamic and static relocation printing to avoid code duplication
authorJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 29 Mar 2019 11:47:19 +0000 (11:47 +0000)
committerJames Henderson <jh7370@my.bristol.ac.uk>
Fri, 29 Mar 2019 11:47:19 +0000 (11:47 +0000)
commit814ab373ac3742fa9b4e4f6c4c0fe89e6c7f6892
tree39cb8ebc22d7697bdf219f2d2f1b8d5c330da908
parentb8fb15d4122b04d620c1d4a89449b6eba2f4b0c0
[llvm-readelf]Merge dynamic and static relocation printing to avoid code duplication

The majority of the printRelocation and printDynamicRelocation functions
were identical. This patch factors this all out into a new function.
There are a couple of minor differences to do with printing of symbols
without names, but I think these are harmless, and in some cases a small
improvement.

Reviewed by: grimar, rupprecht, Higuoxing

Differential Revision: https://reviews.llvm.org/D59823

llvm-svn: 357246
llvm/test/tools/llvm-readobj/elf-reloc-zero-name-or-value.test [new file with mode: 0644]
llvm/tools/llvm-readobj/ELFDumper.cpp