Anonymous user
How kernel, compiler, and C library work together: Difference between revisions
How kernel, compiler, and C library work together (view source)
Revision as of 15:56, 23 December 2019
, 4 years ago→Compiler / Assembler
[unchecked revision] | [unchecked revision] |
(Nuke useless section that doesn't fit in this article) |
|||
Line 27:
The resulting object code does ''not'' yet contain any code for standard functions called. If you <tt>include</tt>d e.g. <tt><stdio.h></tt> and used <tt>printf()</tt>, the object code will merely contain a ''reference'' stating that a function named <tt>printf()</tt> (and taking a <tt>const char *</tt> and a number of unnamed arguments as parameters) must be linked to the object code in order to receive a complete executable.
Some compilers use standard library functions ''internally'', which might result in object files referencing e.g. <tt>memset()</tt> or <tt>memcpy()</tt> even though you did not include the header or used a function of this name. You will have to provide an implementation of these functions to the linker, or the linking will fail. The
==Linker==
|