yaml2obj creates invalid object files even when the input was created by obj2yaml using a valid object file. On the other hand, yaml2obj is used to intentionally create invalid object files for testing purposes. This update balances using specified input values when provided and computing file offsets and sizes if necessary.