Convert MachOObjectFile to a template.