diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-09-15 19:42:42 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-09-15 19:42:42 +0000 |
commit | 4d57159c09b226a5608a26c1bc57f7b66cb80a24 (patch) | |
tree | d9f3c6e698441f5b0ace01e80fc0da6f8bd82c1b /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | 5368618d722e9c097102469287708ebf355968ba (diff) | |
download | bcm5719-llvm-4d57159c09b226a5608a26c1bc57f7b66cb80a24.tar.gz bcm5719-llvm-4d57159c09b226a5608a26c1bc57f7b66cb80a24.zip |
MC: Add support for BigObj
Teach WinCOFFObjectWriter how to write -mbig-obj style object files;
these object files allow for more sections inside an object file.
Our support for BigObj is notably different from binutils and cl: we
implicitly upgrade object files to BigObj instead of asking the user to
compile the same file *again* but with another flag. This matches up
with how LLVM treats ELF variants.
This was tested by forcing LLVM to always emit BigObj files and running
the entire test suite. A specific test has also been added.
I've lowered the maximum number of sections in a normal COFF file,
VS "14" CTP 3 supports no more than 65279 sections. This is important
otherwise we might not switch to BigObj quickly enough, leaving us with
a COFF file that we couldn't link.
yaml2obj support is all that remains to implement.
Differential Revision: http://reviews.llvm.org/D5349
llvm-svn: 217812
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r-- | llvm/tools/llvm-objdump/llvm-objdump.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 2b70167d135..790d08a1fc2 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -591,6 +591,8 @@ static void PrintCOFFSymbolTable(const COFFObjectFile *coff) { if (error(coff->getAuxSymbol<coff_aux_section_definition>(SI + 1, asd))) return; + int32_t AuxNumber = asd->getNumber(Symbol->isBigObj()); + outs() << "AUX " << format("scnlen 0x%x nreloc %d nlnno %d checksum 0x%x " , unsigned(asd->Length) @@ -598,7 +600,7 @@ static void PrintCOFFSymbolTable(const COFFObjectFile *coff) { , unsigned(asd->NumberOfLinenumbers) , unsigned(asd->CheckSum)) << format("assoc %d comdat %d\n" - , unsigned(asd->Number) + , unsigned(AuxNumber) , unsigned(asd->Selection)); } else if (Symbol->isFileRecord()) { const char *FileName; |