summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2014-11-17 11:17:17 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2014-11-17 11:17:17 +0000
commit236b0ca79055779c4d024d66dcd0cbc44265df7f (patch)
tree22602146bb0ce39a2ae4d0f4b901c48952cca9c0 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentd29db9b949034de5ee71a445b9aa8cbe20b62f07 (diff)
downloadbcm5719-llvm-236b0ca79055779c4d024d66dcd0cbc44265df7f.tar.gz
bcm5719-llvm-236b0ca79055779c4d024d66dcd0cbc44265df7f.zip
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
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp3
1 files changed, 1 insertions, 2 deletions
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();
OpenPOWER on IntegriCloud