Currently, MachOWriter::writeSectionData writes dummy data (0xdeadbeef) to fill section data areas in the file even if the section is a virtual one. Since virtual sections don't occupy any space in the file, writing dummy data could results the "OS.tell() - fileStart <= Sec.offset" assertion failure.
This patch fixes the bug by simply not writing any dummy data for virtual sections.
I think that the __TEXT,__eh_frame is unnecessary for the test as is __LD,__compact_unwind and ___DATA,__common. It would be nice to have the TLS and the large zero-filled section in the test.