[COFFObjectFile] Ignore broken symbol table
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Aug 2016 20:20:24 +0000 (20:20 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 30 Aug 2016 20:20:24 +0000 (20:20 +0000)
commitac8cfab51fe45b1b69931b50a1c91ac408a3ea63
tree3c78ec82bb9ab6442ad1309bd74ea540f0bbc335
parent000b071b07477275c8a1bb36116d8d82f239fd20
[COFFObjectFile] Ignore broken symbol table

When binaries are compressed by UPX, information about symbol table
offset and symbol count remain unchanged (but became invalid due to
compression).
This causes failure in the constructor and the rest of the binary cannot
be processed.

Instead, reset symbol related information (symbol/string table pointers,
sizes) - this should disable the related iterators and functions while
the rest of the binary can still be processed.

Patch by Bandzi Michal!

llvm-svn: 280147
llvm/include/llvm/Object/COFF.h
llvm/lib/Object/COFFObjectFile.cpp