From 2d3f01c5dc40e56d39492a32d443654213e4f0b5 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Tue, 4 Sep 2018 16:31:53 +0000 Subject: [PATCH] [MachO] Fix inconsistency between error messages when validating LC_DYSYMTAB llvm-svn: 341379 --- llvm/lib/Object/MachOObjectFile.cpp | 4 ++-- llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index 76480b4..86f2936 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -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; } diff --git a/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test b/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test index 90a5a27..6f8cee7 100644 --- a/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test +++ b/llvm/test/tools/llvm-objdump/macho-bad-dysymtab.test @@ -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 -- 2.7.4