[PATCH] MC: Add support for BigObj

David Majnemer david.majnemer at gmail.com
Sun Sep 14 21:33:53 PDT 2014


Hi ruiu, rnk, Bigcheese,

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 notable 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 hasn't been added because I feel
it is prohibitively expensive to add such a test.

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.

http://reviews.llvm.org/D5349

Files:
  include/llvm/Object/COFF.h
  include/llvm/Support/COFF.h
  lib/MC/WinCOFFObjectWriter.cpp
  tools/llvm-objdump/llvm-objdump.cpp
  tools/llvm-readobj/COFFDumper.cpp
  tools/obj2yaml/coff2yaml.cpp
  tools/yaml2obj/yaml2coff.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5349.13691.patch
Type: text/x-patch
Size: 18984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/ac645cbf/attachment.bin>


More information about the llvm-commits mailing list