diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-09-10 12:51:52 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-09-10 12:51:52 +0000 |
commit | 44f51e511374f467d70c37324a8e5bbf2ea270d8 (patch) | |
tree | 3073f00e67964e434982e150df56ac5a33a4a6fb /llvm/lib/MC/WinCOFFObjectWriter.cpp | |
parent | 5d34a2b887a985651cd098153506c45227123b65 (diff) | |
download | bcm5719-llvm-44f51e511374f467d70c37324a8e5bbf2ea270d8.tar.gz bcm5719-llvm-44f51e511374f467d70c37324a8e5bbf2ea270d8.zip |
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
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r-- | llvm/lib/MC/WinCOFFObjectWriter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<size_t>(COFF::MaxNumberOfSections)) + if (NumberOfSections > static_cast<size_t>(COFF::MaxNumberOfSections16)) report_fatal_error( "PE COFF object files can't have more than 65,299 sections"); |