Reputation: 711
I know that a OBJ file produced after compilation of C/C++ source code in any standard compiler generates OBJ file, which later LINKed with the rest of the required libraries to form the EXEcutable file. I want to know the format/structure of the OBJ file. Please go ahead.
Upvotes: 2
Views: 3270
Reputation: 435
the .obj file is a format used by Microsoft Compilers and is described in the (Common Object File Format) COFF spec
other compilers use different formats to store object code, e.g. ELF on Linux
Upvotes: 1
Reputation: 18446
Under windows, it'd be a COFF object. Google this file format for a spec. They are linked to produce a PE.
Upvotes: -1
Reputation: 26910
C++ Builder (and Delphi) use OMF format obj files. See this wikipedia link for details.
Additional information: Microsoft Visual C++ use an incompatible COFF, that's why C++ Builder have a utility to convert them.
See also: What's the difference between the OMF and COFF format?
Upvotes: 6