From 44f51e511374f467d70c37324a8e5bbf2ea270d8 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 10 Sep 2014 12:51:52 +0000 Subject: Object: Add support for bigobj This adds support for reading the "bigobj" variant of COFF produced by cl's /bigobj and mingw's -mbig-obj. The most significant difference that bigobj brings is more than 2**16 sections to COFF. bigobj brings a few interesting differences with it: - It doesn't have a Characteristics field in the file header. - It doesn't have a SizeOfOptionalHeader field in the file header (it's only used in executable files). - Auxiliary symbol records have the same width as a symbol table entry. Since symbol table entries are bigger, so are auxiliary symbol records. Write support will come soon. Differential Revision: http://reviews.llvm.org/D5259 llvm-svn: 217496 --- llvm/lib/MC/WinCOFFObjectWriter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp') diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp index 489c92675f6..d382037e31a 100644 --- a/llvm/lib/MC/WinCOFFObjectWriter.cpp +++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp @@ -849,7 +849,7 @@ void WinCOFFObjectWriter::WriteObject(MCAssembler &Asm, MakeSectionReal(*Section, Number); } - if (NumberOfSections > static_cast(COFF::MaxNumberOfSections)) + if (NumberOfSections > static_cast(COFF::MaxNumberOfSections16)) report_fatal_error( "PE COFF object files can't have more than 65,299 sections"); -- cgit v1.2.3