The linker gets code for f that has a relocation that says "here
insert a call to g", and gets code for g that has a relocation that
says "here insert a call to f". The linker places the code for f and
g into the output. Then it walks over all the relocations, and, for
this example, inserts a call to the appropriate address.
Ian