[llvm-readelf][llvm-readobj] - Fix the indentation when printing dynamic tags.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 16 Jan 2020 14:38:02 +0000 (17:38 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 21 Jan 2020 11:24:50 +0000 (14:24 +0300)
commit89e6601fb152b39700977d70e5604309f05475e5
tree5a48c40fbbb7b441afb1e7522cfe307e15979c3a
parent5f5f4785648959dfbb5c88d183816f85a0974561
[llvm-readelf][llvm-readobj] - Fix the indentation when printing dynamic tags.

This change is similar to one made for llvm-objdump in D72838.

llvm-readelf/llvm-readobj tools do not align the "Name/Value" column properly.
This patch adds a logic to calculate the size of indentation on fly
to fix such issues.

Differential revision: https://reviews.llvm.org/D72843
llvm/test/tools/llvm-readobj/ELF/dynamic-tags-machine-specific.test
llvm/test/tools/llvm-readobj/ELF/dynamic-tags.test
llvm/tools/llvm-readobj/ELFDumper.cpp