What does an object file contain?

Object files can contain a bunch of stuff: Basically it’s some or all of the list below:

  • Symbol Names
  • Compiled code
  • Constant data, eg. strings
  • Imports – which symbols the compiled code references (gets fixed up by linker)
  • Exports – which symbols the object file makes available to OTHER object files.

The linker turns a bunch of object files into an executable, by matching up all the imports and exports, and modifying the compiled code so the correct functions get called.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)