1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/MC/MachO/zerofill-1.s
Davide Italiano a12e184ad8 [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
2015-09-05 01:02:05 +00:00

132 lines
3.7 KiB
ArmAsm

// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -file-headers -s -sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
.text
.byte 0 // Align to 2**3 bytes, not 2**1
.zerofill __DATA, __common, zfill, 2, 1
.data
.align 3
// CHECK: File: <stdin>
// CHECK: Format: Mach-O 32-bit i386
// CHECK: Arch: i386
// CHECK: AddressSize: 32bit
// CHECK: MachHeader {
// CHECK: Magic: Magic (0xFEEDFACE)
// CHECK: CpuType: X86 (0x7)
// CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
// CHECK: FileType: Relocatable (0x1)
// CHECK: NumOfLoadCommands: 4
// CHECK: SizeOfLoadCommands: 380
// CHECK: Flags [ (0x0)
// CHECK: ]
// 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: 0x1
// CHECK: Offset: 408
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
// CHECK: Type: 0x0
// CHECK: Attributes [ (0x800000)
// CHECK: PureInstructions (0x800000)
// CHECK: ]
// CHECK: Reserved1: 0x0
// CHECK: Reserved2: 0x0
// CHECK: SectionData (
// CHECK: 0000: 00 |.|
// CHECK: )
// CHECK: }
// CHECK: Section {
// CHECK: Index: 1
// CHECK: Name: __common (5F 5F 63 6F 6D 6D 6F 6E 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: 0x2
// CHECK: Offset: 0
// CHECK: Alignment: 1
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
// CHECK: Type: LocReloc (0x1)
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
// CHECK: Reserved2: 0x0
// CHECK: }
// CHECK: Section {
// CHECK: Index: 2
// CHECK: Name: __data (5F 5F 64 61 74 61 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: 0x0
// CHECK: Offset: 416
// CHECK: Alignment: 3
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
// CHECK: Type: 0x0
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
// CHECK: Reserved2: 0x0
// CHECK: SectionData (
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Relocations [
// CHECK: ]
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: zfill (1)
// CHECK: Type: Section (0xE)
// CHECK: Section: __common (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
// CHECK: Name:
// CHECK: Size: 260
// CHECK: vmaddr: 0x0
// CHECK: vmsize: 0xA
// CHECK: fileoff: 408
// CHECK: filesize: 8
// CHECK: maxprot: rwx
// CHECK: initprot: rwx
// CHECK: nsects: 3
// 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: }