OSDN Git Service

[obj2yaml] - Don't crash when an object has an empty symbol table.
authorGeorgii Rymar <grimar@accesssoftek.com>
Tue, 22 Dec 2020 14:36:16 +0000 (17:36 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 12 Jan 2021 11:08:59 +0000 (14:08 +0300)
commitc15a57cc1a86bfb72f4fa0e7d265494babc3b412
treeff9292cf0984a1120d74c773daea1b8cc7063d12
parent60df7c08b1f4447309c0c07fec1c8bc7267562fc
[obj2yaml] - Don't crash when an object has an empty symbol table.

Currently we crash when we have an object with SHT_SYMTAB/SHT_DYNSYM sections
of size 0.

With this patch instead of the crash we start to dump them properly.

Differential revision: https://reviews.llvm.org/D93697
llvm/test/tools/obj2yaml/ELF/no-symtab.yaml
llvm/tools/obj2yaml/elf2yaml.cpp