[llvm-readobj] Should declare `ListScope` for `verneed` entries.
Summary: YAML mappings require keys to be unique. See: https://yaml.org/spec/1.2/spec.html#id2764652
Reviewers: jhenderson, grimar, rupprecht, espindola, ruiu
Reviewed By: ruiu
Subscribers: ruiu, emaste, arichardson, MaskRay, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60438
llvm-svn: 358078
diff --git a/llvm/tools/llvm-readobj/ELFDumper.cpp b/llvm/tools/llvm-readobj/ELFDumper.cpp
index e6bf4a0..fb60dcf 100644
--- a/llvm/tools/llvm-readobj/ELFDumper.cpp
+++ b/llvm/tools/llvm-readobj/ELFDumper.cpp
@@ -4635,6 +4635,7 @@
Obj->base() + StrTab->sh_offset + Verneed->vn_file)));
const uint8_t *VernauxBuf = VerneedBuf + Verneed->vn_aux;
+ ListScope L(W, "Entries");
for (unsigned J = 0; J < Verneed->vn_cnt; ++J) {
const Elf_Vernaux *Vernaux =
reinterpret_cast<const Elf_Vernaux *>(VernauxBuf);