git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242795
91177308-0d34-0410-b5e6-
96231b3b80d8
TargetName = SecName.get();
} else if (Sym.first) {
const Elf_Shdr *SymTable = Sym.first;
- ErrorOr<const Elf_Shdr *> StrTableSec = Obj->getSection(SymTable->sh_link);
- error(StrTableSec.getError());
- ErrorOr<StringRef> StrTableOrErr = Obj->getStringTable(*StrTableSec);
+ ErrorOr<StringRef> StrTableOrErr = Obj->getStringTableForSymtab(*SymTable);
error(StrTableOrErr.getError());
TargetName = errorOrDefault(Sym.second->getName(*StrTableOrErr));
}