yaml2obj: split out COFF logic into separate file