[llvm-readobj] Print ELF header flags names in GNU output
authorSimon Atanasyan <simon@atanasyan.com>
Thu, 25 Oct 2018 05:39:27 +0000 (05:39 +0000)
committerSimon Atanasyan <simon@atanasyan.com>
Thu, 25 Oct 2018 05:39:27 +0000 (05:39 +0000)
commit199325450932a06d4392cb4d87fd69fc163b00eb
treee658a9ef06e390e0164dcb1dafc9ae373e75bd6a
parent00897e9b7b88f0435565909480021803c21ca3b7
[llvm-readobj] Print ELF header flags names in GNU output

GNU readelf tool prints hex value of the ELF header flags field and the
flags names. This change adds the same functionality to llvm-readobj.
Now llvm-readobj can print MIPS and RISCV flags.

New GNUStyle::printFlags() method is a copy of ScopedPrinter::printFlags()
routine. Probably we can escape code duplication and / or simplify the
printFlags() method. But it's a task for separate commit.

Differential revision: https://reviews.llvm.org/D52027

llvm-svn: 345238
llvm/test/tools/llvm-readobj/gnu-file-headers.test
llvm/tools/llvm-readobj/ELFDumper.cpp