[llvm-readelf] - Do not error out when dumping symbols.
authorGeorgii Rymar <grimar@accesssoftek.com>
Wed, 1 Jul 2020 12:25:33 +0000 (15:25 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Fri, 3 Jul 2020 08:55:35 +0000 (11:55 +0300)
commit64156347baa4452489ec1c0fab8eec48d1ffd168
treea7f106173cd26fe9962027ace7a49740fd007c20
parent063258eb6e32d7c185023b81f10b34f9bddbd8b3
[llvm-readelf] - Do not error out when dumping symbols.

When the --symbols option/--dyn-symbols is given we might report an
error and exit when something goes not right. E.g. when the SHT_SYMTAB
section is broken. Though we could report a warning and try to continue
dumping instead in many cases.

This patch removes `unwrapOrErr` calls from the code involved in the
flow described.

Differential revision: https://reviews.llvm.org/D82955
llvm/test/Object/invalid.test
llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
llvm/test/tools/llvm-readobj/ELF/symbols.test
llvm/tools/llvm-readobj/ELFDumper.cpp