diff options
author | Davide Italiano <davide@freebsd.org> | 2015-09-05 01:02:05 +0000 |
---|---|---|
committer | Davide Italiano <davide@freebsd.org> | 2015-09-05 01:02:05 +0000 |
commit | 591b5a5e726189525a9f29a424d0579678a2c56b (patch) | |
tree | b8372c0bc541e591912811fe2efcf42e8c80ab8c /llvm/test/MC/MachO/zerofill-5.s | |
parent | 2a9a6d8c38b78c757533ee6ba11e44c50d419395 (diff) | |
download | bcm5719-llvm-591b5a5e726189525a9f29a424d0579678a2c56b.tar.gz bcm5719-llvm-591b5a5e726189525a9f29a424d0579678a2c56b.zip |
[MC] Convert other MachO tests from macho-dump to llvm-readobj.
This commit accomplish two goals:
1) it's a step forward to deprecate macho-dump, now less than 40 tests
rely on it.
2) It tests all the MachO specific features introduced in llvm-readobj in
the following commits: r246789, r246665, r246474.
While the conversion is mostly mechanical (I double-checked all the
tests output one by one, but still), a post-commit review is greatly
appreciated.
llvm-svn: 246904
Diffstat (limited to 'llvm/test/MC/MachO/zerofill-5.s')
-rw-r--r-- | llvm/test/MC/MachO/zerofill-5.s | 209 |
1 files changed, 107 insertions, 102 deletions
diff --git a/llvm/test/MC/MachO/zerofill-5.s b/llvm/test/MC/MachO/zerofill-5.s index e028821294d..b688e6b0692 100644 --- a/llvm/test/MC/MachO/zerofill-5.s +++ b/llvm/test/MC/MachO/zerofill-5.s @@ -1,4 +1,4 @@ -// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s +// RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s .text .align 3 @@ -6,104 +6,109 @@ .zerofill __DATA,__bss,_g0,8,3 -// CHECK: ('cputype', 16777223) -// CHECK: ('cpusubtype', 3) -// CHECK: ('filetype', 1) -// CHECK: ('num_load_commands', 4) -// CHECK: ('load_commands_size', 352) -// CHECK: ('flag', 0) -// CHECK: ('reserved', 0) -// CHECK: ('load_commands', [ -// CHECK: # Load Command 0 -// CHECK: (('command', 25) -// CHECK: ('size', 232) -// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('vm_addr', 0) -// CHECK: ('vm_size', 16) -// CHECK: ('file_offset', 384) -// CHECK: ('file_size', 4) -// CHECK: ('maxprot', 7) -// CHECK: ('initprot', 7) -// CHECK: ('num_sections', 2) -// CHECK: ('flags', 0) -// CHECK: ('sections', [ -// CHECK: # Section 0 -// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 0) -// CHECK: ('size', 4) -// CHECK: ('offset', 384) -// CHECK: ('alignment', 3) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x80000000) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: ('_section_data', '02000000') -// CHECK: # Section 1 -// CHECK: (('section_name', '__bss\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') -// CHECK: ('address', 8) -// CHECK: ('size', 8) -// CHECK: ('offset', 0) -// CHECK: ('alignment', 3) -// CHECK: ('reloc_offset', 0) -// CHECK: ('num_reloc', 0) -// CHECK: ('flags', 0x1) -// CHECK: ('reserved1', 0) -// CHECK: ('reserved2', 0) -// CHECK: ('reserved3', 0) -// CHECK: ), -// CHECK: ('_relocations', [ -// CHECK: ]) -// CHECK: ('_section_data', 'cffaedfe 07000001') -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 2 -// CHECK: (('command', 2) -// CHECK: ('size', 24) -// CHECK: ('symoff', 388) -// CHECK: ('nsyms', 1) -// CHECK: ('stroff', 404) -// CHECK: ('strsize', 8) -// CHECK: ('_string_data', '\x00_g0\x00\x00\x00\x00') -// CHECK: ('_symbols', [ -// CHECK: # Symbol 0 -// CHECK: (('n_strx', 1) -// CHECK: ('n_type', 0xe) -// CHECK: ('n_sect', 2) -// CHECK: ('n_desc', 0) -// CHECK: ('n_value', 8) -// CHECK: ('_string', '_g0') -// CHECK: ), -// CHECK: ]) -// CHECK: ), -// CHECK: # Load Command 3 -// CHECK: (('command', 11) -// CHECK: ('size', 80) -// CHECK: ('ilocalsym', 0) -// CHECK: ('nlocalsym', 1) -// CHECK: ('iextdefsym', 1) -// CHECK: ('nextdefsym', 0) -// CHECK: ('iundefsym', 1) -// CHECK: ('nundefsym', 0) -// CHECK: ('tocoff', 0) -// CHECK: ('ntoc', 0) -// CHECK: ('modtaboff', 0) -// CHECK: ('nmodtab', 0) -// CHECK: ('extrefsymoff', 0) -// CHECK: ('nextrefsyms', 0) -// CHECK: ('indirectsymoff', 0) -// CHECK: ('nindirectsyms', 0) -// CHECK: ('extreloff', 0) -// CHECK: ('nextrel', 0) -// CHECK: ('locreloff', 0) -// CHECK: ('nlocrel', 0) -// CHECK: ('_indirect_symbols', [ -// CHECK: ]) -// CHECK: ), -// CHECK: ]) +// CHECK: File: <stdin> +// CHECK: Format: Mach-O 64-bit x86-64 +// CHECK: Arch: x86_64 +// CHECK: AddressSize: 64bit +// CHECK: MachHeader { +// CHECK: Magic: Magic64 (0xFEEDFACF) +// CHECK: CpuType: X86-64 (0x1000007) +// CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3) +// CHECK: FileType: Relocatable (0x1) +// CHECK: NumOfLoadCommands: 4 +// CHECK: SizeOfLoadCommands: 352 +// CHECK: Flags [ (0x0) +// CHECK: ] +// CHECK: Reserved: 0x0 +// CHECK: } +// CHECK: Sections [ +// CHECK: Section { +// CHECK: Index: 0 +// CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00) +// CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00) +// CHECK: Address: 0x0 +// CHECK: Size: 0x4 +// CHECK: Offset: 384 +// CHECK: Alignment: 3 +// CHECK: RelocationOffset: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: Type: 0x0 +// CHECK: Attributes [ (0x800000) +// CHECK: PureInstructions (0x800000) +// CHECK: ] +// CHECK: Reserved1: 0x0 +// CHECK: Reserved2: 0x0 +// CHECK: Reserved3: 0x0 +// CHECK: SectionData ( +// CHECK: 0000: 02000000 |....| +// CHECK: ) +// CHECK: } +// CHECK: Section { +// CHECK: Index: 1 +// CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00) +// CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00) +// CHECK: Address: 0x8 +// CHECK: Size: 0x8 +// CHECK: Offset: 0 +// CHECK: Alignment: 3 +// CHECK: RelocationOffset: 0x0 +// CHECK: RelocationCount: 0 +// CHECK: Type: LocReloc (0x1) +// CHECK: Attributes [ (0x0) +// CHECK: ] +// CHECK: Reserved1: 0x0 +// CHECK: Reserved2: 0x0 +// CHECK: Reserved3: 0x0 +// CHECK: } +// CHECK: ] +// CHECK: Relocations [ +// CHECK: ] +// CHECK: Symbols [ +// CHECK: Symbol { +// CHECK: Name: _g0 (1) +// CHECK: Type: Section (0xE) +// CHECK: Section: __bss (0x2) +// CHECK: RefType: UndefinedNonLazy (0x0) +// CHECK: Flags [ (0x0) +// CHECK: ] +// CHECK: Value: 0x8 +// CHECK: } +// CHECK: ] +// CHECK: Indirect Symbols { +// CHECK: Number: 0 +// CHECK: Symbols [ +// CHECK: ] +// CHECK: } +// CHECK: Segment { +// CHECK: Cmd: LC_SEGMENT_64 +// CHECK: Name: +// CHECK: Size: 232 +// CHECK: vmaddr: 0x0 +// CHECK: vmsize: 0x10 +// CHECK: fileoff: 384 +// CHECK: filesize: 4 +// CHECK: maxprot: rwx +// CHECK: initprot: rwx +// CHECK: nsects: 2 +// CHECK: flags: 0x0 +// CHECK: } +// CHECK: Dysymtab { +// CHECK: ilocalsym: 0 +// CHECK: nlocalsym: 1 +// CHECK: iextdefsym: 1 +// CHECK: nextdefsym: 0 +// CHECK: iundefsym: 1 +// CHECK: nundefsym: 0 +// CHECK: tocoff: 0 +// CHECK: ntoc: 0 +// CHECK: modtaboff: 0 +// CHECK: nmodtab: 0 +// CHECK: extrefsymoff: 0 +// CHECK: nextrefsyms: 0 +// CHECK: indirectsymoff: 0 +// CHECK: nindirectsyms: 0 +// CHECK: extreloff: 0 +// CHECK: nextrel: 0 +// CHECK: locreloff: 0 +// CHECK: nlocrel: 0 +// CHECK: } |