Write dt to Object file.
reference to object file
data to write
segment to write it to
starting offset in segment - will get updated to reflect ending offset
See Implementation
Write dt to Object file.