Modified link.c to match Katriels semi implementation. There are
compiling errors. Works for Katriel.