What goes into an object file?

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/carlhelen/article/details/85338850

An object file contains five kinds of information.
Header information: overall information about the file, such as the size of the code, name of the source file it was translated from, and creation date.
Object code: Binary instructions and data generated by a compiler or assembler.
Relocation: A list of the places in the object code that have to be fixed up when the linker changes the addresses of the object code.
Symbols: Global symbols defined in this module, symbols to be imported from other modules or defined by the linker.
Debugging information: Other information about the object code not needed for linking but of use to a debugger. This includes
source file and line number information, local symbols, descriptions of data structures used by the object code such as C structure
definitions.

猜你喜欢

转载自blog.csdn.net/carlhelen/article/details/85338850