1.The implementation is in the library.(as the libc.so for printf);
You must specify the path of the library when you link your objects.
The libc is a standard or default library for gcc,don't need you to point out,the linker is really smart.
2.The compiler actually don't known or don't need to known where is the symbol.It just treat it
as a external symbol.The work of reference is taken by linker when linking.