mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Readobj: If NumbersOfSections is 0xffff, it's an COFF import library.
0xffff does not mean that there are 65535 sections in a COFF file but indicates that it's a COFF import library. This patch fixes SEGV error when an import library file is passed to llvm-readobj. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194844 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -57,6 +57,8 @@ struct coff_file_header {
|
||||
support::ulittle32_t NumberOfSymbols;
|
||||
support::ulittle16_t SizeOfOptionalHeader;
|
||||
support::ulittle16_t Characteristics;
|
||||
|
||||
bool isImportLibrary() const { return NumberOfSections == 0xffff; }
|
||||
};
|
||||
|
||||
/// The 32-bit PE header that follows the COFF header.
|
||||
|
Reference in New Issue
Block a user