[llvm-readelf] - Report a warning when .hash section contains a chain with a cycle.
commit906588ac22375ae9973c23987be3e58a33ee85d0
authorGeorge Rimar <grimar@accesssoftek.com>
Wed, 2 Oct 2019 14:11:35 +0000 (2 14:11 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Wed, 2 Oct 2019 14:11:35 +0000 (2 14:11 +0000)
tree8edeb941fa2456e05190d6aea9de1d071070c727
parentc17aeb980644f3db9bd2e085864db96fd419d99b
[llvm-readelf] - Report a warning when .hash section contains a chain with a cycle.

It is possible to craft a .hash section that triggers an infinite loop
in llvm-readelf code. This patch fixes the issue and introduces
a warning.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373476 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-readobj/elf-hash-symbols.test
tools/llvm-readobj/ELFDumper.cpp