[llvm-readobj] - Fix letters used for dumping section types in GNU style.
authorGeorgii Rymar <grimar@accesssoftek.com>
Thu, 12 Dec 2019 14:09:55 +0000 (17:09 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Fri, 13 Dec 2019 08:31:24 +0000 (11:31 +0300)
commit422b078c69ee7ae5c2529992eed4fd8a21aedda4
tree0538819d01fcb4ff26087da58931b0c1b8791149
parent5c80a4f454ac6dad09e5c27f32a28af62cdb4d13
[llvm-readobj] - Fix letters used for dumping section types in GNU style.

I've noticed that when we have all regular flags set, we print "WAEXMSILoGTx"
instead of "WAXMSILOGTCE" printed by GNU readelf.

It happens because:
1) We print SHF_EXCLUDE at the wrong place.
2) We do not recognize SHF_COMPRESSED, we print "x" instead of "C".
3) We print "o" instead of "O" for SHF_OS_NONCONFORMING.

This patch fixes differences and adds test cases.

Differential revision: https://reviews.llvm.org/D71418
llvm/test/MC/ELF/exclude-debug-dwo.s
llvm/test/tools/llvm-readobj/ELF/section-flags.test
llvm/tools/llvm-readobj/ELFDumper.cpp