llvm-project/llvm/test/ObjectYAML/MachO
Seiya Nuta 4f15732067 [yaml2obj][MachO] Don't fill dummy data for virtual sections
Summary:
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.

Reviewers: beanz, jhenderson, rupprecht, alexshap

Reviewed By: alexshap

Subscribers: compnerd, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D62991

llvm-svn: 363525
2019-06-17 02:07:20 +00:00
..
BigEndian.yaml
DWARF-BigEndian.yaml Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
DWARF-LittleEndian.yaml Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
DWARF-debug_abbrev.yaml
DWARF-debug_aranges.yaml
DWARF-debug_info.yaml
DWARF-debug_line.yaml
DWARF-debug_str.yaml Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
DWARF-pubsections.yaml
DWARF2-AddrSize8-FormValues.yaml
DWARF5-abbrevValues.yaml
DWARF5-debug_info.yaml
LittleEndian.yaml
bind_opcode.yaml
bogus_load_command.yaml
build_version_command.yaml
dylib_dylinker_command.yaml Make YAML quote forward slashes. 2018-10-12 16:31:20 +00:00
export_trie.yaml
fat_macho_i386_x86_64.yaml
lazy_bind_opcode.yaml
load_commands.yaml
mach_header.yaml
mach_header_32_malformed.yaml
mach_header_64.yaml
null_string_entries.yaml
out_of_order_linkedit.yaml
rebase_opcode.yaml
sections.yaml
symtab.yaml
virtual_section.yaml [yaml2obj][MachO] Don't fill dummy data for virtual sections 2019-06-17 02:07:20 +00:00
weak_bind_opcode.yaml