I like the idea, but what about templates? For them, you'd basically be stuffing source code into the object files
Nothing wrong with this. There is still a gain here -- object code compiled from the source containing the original source is tightly coupled with the template. You can be sure that this object file will link against one that you build based on the template contained in it.
-Steve