From 236b0ca79055779c4d024d66dcd0cbc44265df7f Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Mon, 17 Nov 2014 11:17:17 +0000 Subject: Object, COFF: Tighten the object file parser We were a little lax in a few areas: - We pretended that import libraries were like any old COFF file, they are not. In fact, they aren't really COFF files at all, we should probably grow some specialized functionality to handle them smarter. - Our symbol iterators were more than happy to attempt to go past the end of the symbol table if you had a symbol with a bad list of auxiliary symbols. llvm-svn: 222124 --- llvm/tools/llvm-objdump/llvm-objdump.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp') diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index da5c275be8d..8903bff8f97 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -307,8 +307,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) { } for (const SectionRef &Section : Obj->sections()) { - bool Text = Section.isText(); - if (!Text) + if (!Section.isText() || Section.isVirtual()) continue; uint64_t SectionAddr = Section.getAddress(); -- cgit v1.2.3