Don't get confused with sections whose section number is reserved.
[oota-llvm.git] / tools / llvm-readobj / ELFDumper.cpp
index 59a351d52994e97ce9152efdca029e011343d528..d8c089a63e39ea363971fb17a3ee0c430ac7f186 100644 (file)
@@ -156,9 +156,7 @@ getSectionNameIndex(const ELFO &Obj, typename ELFO::Elf_Sym_Iter Symbol,
     SectionName = "Reserved";
   else {
     if (SectionIndex == SHN_XINDEX)
-      SectionIndex = Obj.getSymbolTableIndex(&*Symbol);
-    assert(SectionIndex != SHN_XINDEX &&
-           "getSymbolTableIndex should handle this");
+      SectionIndex = Obj.getExtendedSymbolTableIndex(&*Symbol);
     const typename ELFO::Elf_Shdr *Sec = Obj.getSection(SectionIndex);
     SectionName = errorOrDefault(Obj.getSectionName(Sec));
   }