Fixed all issues, build now compiles

I fixed the linking issues that I forgot about in the metrosim makefile.
I ran into the relocatable device code issue again and I don't know why.