[MachO] Fix inconsistency between error messages when validating LC_DYSYMTAB
llvm-svn: 341379
This commit is contained in:
parent
7690af4da9
commit
2d3f01c5dc
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue