[MachO] Fix inconsistency between error messages when validating LC_DYSYMTAB

llvm-svn: 341379
This commit is contained in:
Francis Visoiu Mistrih 2018-09-04 16:31:53 +00:00
parent 7690af4da9
commit 2d3f01c5dc
2 changed files with 3 additions and 3 deletions

View File

@ -1593,7 +1593,7 @@ MachOObjectFile::MachOObjectFile(MemoryBufferRef Object, bool IsLittleEndian,
return;
}
if (Dysymtab.nextdefsym != 0 && Dysymtab.iextdefsym > Symtab.nsyms) {
Err = malformedError("nextdefsym in LC_DYSYMTAB load command "
Err = malformedError("iextdefsym in LC_DYSYMTAB load command "
"extends past the end of the symbol table");
return;
}
@ -1606,7 +1606,7 @@ MachOObjectFile::MachOObjectFile(MemoryBufferRef Object, bool IsLittleEndian,
return;
}
if (Dysymtab.nundefsym != 0 && Dysymtab.iundefsym > Symtab.nsyms) {
Err = malformedError("nundefsym in LC_DYSYMTAB load command "
Err = malformedError("iundefsym in LC_DYSYMTAB load command "
"extends past the end of the symbol table");
return;
}

View File

@ -23,7 +23,7 @@ LoadCommands:
ilocalsym: 0
nlocalsym: 0
iextdefsym: 4
#CHECK: truncated or malformed object (nextdefsym in LC_DYSYMTAB load command extends past the end of the symbol table)
#CHECK: truncated or malformed object (iextdefsym in LC_DYSYMTAB load command extends past the end of the symbol table)
nextdefsym: 2
iundefsym: 2
nundefsym: 1