Don't disassemble symbols with an unknown address or size.
authorEric Christopher <echristo@gmail.com>
Wed, 3 Apr 2013 18:31:23 +0000 (18:31 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 3 Apr 2013 18:31:23 +0000 (18:31 +0000)
Patch by Nico Rieck!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178678 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-objdump/llvm-objdump.cpp

index 322bd21b289dbeccba6a7bb64e778cd7495d73b2..7832cf0dff4c878677411551b15f105d89dea3a5 100644 (file)
@@ -228,6 +228,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
       if (!error(i->containsSymbol(*si, contains)) && contains) {
         uint64_t Address;
         if (error(si->getAddress(Address))) break;
+        if (Address == UnknownAddressOrSize) continue;
         Address -= SectionAddr;
 
         StringRef Name;