What does an object file contain?

后端 未结 8 954
长情又很酷
长情又很酷 2020-12-13 06:14

During the various stages of compilation in C or C++, I know that an object file gets generated (i.e., any_name.o file). What does this .o file contain? I can\'t open it sin

8条回答
  •  春和景丽
    2020-12-13 06:31

    The object file is the compiled source.

    This means that it's machine code, which is dependent on the target platform (you can compile for Unix on Windows if you really want to) and the compiler used. Different compilers will produce different machine code from the same source file.

提交回复
热议问题