Introduction
A classic COFF object file counts its sections
in 16 bits and numbers them in 16-bit symbol fields, so it can have at most 65,279
(LLVM COFF.h: MaxNumberOfSections16 = 65279).
Heavily templated C++ can need more. Microsoft’s compiler in
Visual Studio writes the
/bigobj format for those: a longer header with 32-bit counts, and symbols
with 32-bit section numbers. A reader finds it by the header’s signature, the version
(2 or more, MinBigObjectVersion) and the class identifier; LLVM’s
COFFObjectFile reads it.
Structure
The file starts with a 56-byte header that begins 00 00 FF FF, the same
bytes as other anonymous headers; a class identifier inside it tells a bigobj from the
others. The section table follows, with 40-byte entries as in COFF, and then each
section’s data and relocations. The symbol table has 20-byte records instead of 18, and
a string table follows it.
0bigobj header: signature, version, machine, class identifier, counts and symbol table offset56 bytes56section table40 bytes each…section data and relocationsvaries, 10 bytes per relocation…symbol table20 bytes per record…string table: a 4-byte size, then long namesvaries
Not described
The gaps are those on the object file overview. For bigobj, the explorer was tested only on files the site built; no real bigobj file was seen.
Also used for
- Wavefront OBJ – A plain text mesh of vertices, normals and faces, read by almost every 3D program.
Variants
- OMF object file – Intel’s object format for 16-bit DOS and Windows compilers, in typed records
- COFF object file – compiled code from Windows compilers, waiting for the linker
- COFF object file (bigobj) – the extended form of COFF, for objects with very many sections
- Anonymous object header – the wrapper Microsoft’s compiler writes for link-time code generation
Links
Software
- Visual Studio – Microsoft’s development environment, whose compiler writes bigobj files with
/bigobj(Windows) - LLVM – compiler toolkit with
llvm-objdump(Windows, macOS, Linux)