[llvm-readobj] - Fix the invalid dumping of the dynamic sections without terminating...
authorGeorge Rimar <grimar@accesssoftek.com>
Thu, 28 Feb 2019 08:15:59 +0000 (08:15 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Thu, 28 Feb 2019 08:15:59 +0000 (08:15 +0000)
commit7b4fce12b35bf89db45cbc13329146c58d156b53
tree894bdced088b3827582a520d8cba6340852ebc24
parent6c57395fb438881018e0897f09f2137dc8dbd111
[llvm-readobj] - Fix the invalid dumping of the dynamic sections without terminating DT_NULL entry.

This is https://bugs.llvm.org/show_bug.cgi?id=40861,

Previously llvm-readobj would print the DT_NULL sometimes
for the dynamic section that has no terminator entry.

The logic of printDynamicTable was a bit overcomplicated.
I rewrote it slightly to fix the issue and commented.

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

llvm-svn: 355073
llvm/test/tools/llvm-readobj/elf-dynamic-table-dtnull.s [new file with mode: 0644]
llvm/tools/llvm-readobj/ELFDumper.cpp