1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00

[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
This commit is contained in:
Davide Italiano 2015-09-05 01:02:05 +00:00
parent 3c0fba77c7
commit a12e184ad8
23 changed files with 3261 additions and 2603 deletions

View File

@ -1,4 +1,4 @@
; RUN: llvm-mc -triple arm64-apple-darwin -filetype=obj -o - < %s | macho-dump -dump-section-data | FileCheck %s ; RUN: llvm-mc -triple arm64-apple-darwin -filetype=obj -o - < %s | llvm-readobj -s -sd | FileCheck %s
; rdar://13028719 ; rdar://13028719
.globl context_save0 .globl context_save0
@ -18,4 +18,11 @@ Lcontext_save1_size: .quad (Lcontext_save1_end - Lcontext_save1)
Llockup_release: Llockup_release:
.quad 0 .quad 0
; CHECK: ('_section_data', '05000000 00000000 05000000 00000000 10000000 00000000 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 1f2003d5 00000000 00000000 00000000 00000000 10000000 00000000 00000000 00000000') ; CHECK: SectionData (
; CHECK: 0000: 05000000 00000000 05000000 00000000 |................|
; CHECK: 0010: 10000000 00000000 1F2003D5 1F2003D5 |......... ... ..|
; CHECK: 0020: 1F2003D5 1F2003D5 1F2003D5 1F2003D5 |. ... ... ... ..|
; CHECK: 0030: 1F2003D5 1F2003D5 1F2003D5 1F2003D5 |. ... ... ... ..|
; CHECK: 0040: 00000000 00000000 00000000 00000000 |................|
; CHECK: 0050: 10000000 00000000 00000000 00000000 |................|
; CHECK: )

View File

@ -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 -r | FileCheck %s
// Test case for rdar://10743265 // Test case for rdar://10743265
@ -17,11 +17,9 @@ _base = .
_start_ap_2: _start_ap_2:
cli cli
// CHECK: ('_relocations', [ // CHECK: Relocations [
// CHECK: # Relocation 0 // CHECK: Section __text {
// CHECK: (('word-0', 0x0), // CHECK: 0x0 0 2 1 X86_64_RELOC_SUBTRACTOR 0 _base
// CHECK: ('word-1', 0x5c000000)), // CHECK: 0x0 0 2 1 X86_64_RELOC_UNSIGNED 0 _start_ap_2
// CHECK: # Relocation 1 // CHECK: }
// CHECK: (('word-0', 0x0), // CHECK: ]
// CHECK: ('word-1', 0xc000001)),
// CHECK: ])

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin %s -filetype=obj -o - | llvm-readobj -s -sd -r | FileCheck %s
// Make sure MC can handle file level .cfi_startproc and .cfi_endproc that creates // Make sure MC can handle file level .cfi_startproc and .cfi_endproc that creates
// an empty frame. // an empty frame.
@ -26,23 +26,33 @@ Leh_func_end0:
.cfi_sections .debug_frame .cfi_sections .debug_frame
Ltext_end: Ltext_end:
// CHECK: (('section_name', '__debug_frame\x00\x00\x00') // CHECK: Section {
// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Index: 1
// CHECK-NEXT: ('address', 8) // CHECK: Name: __debug_frame (5F 5F 64 65 62 75 67 5F 66 72 61 6D 65 00 00 00)
// CHECK-NEXT: ('size', 52) // CHECK: Segment: __DWARF (5F 5F 44 57 41 52 46 00 00 00 00 00 00 00 00 00)
// CHECK-NEXT: ('offset', 332) // CHECK: Address: 0x8
// CHECK-NEXT: ('alignment', 2) // CHECK: Size: 0x34
// CHECK-NEXT: ('reloc_offset', 384) // CHECK: Offset: 332
// CHECK-NEXT: ('num_reloc', 2) // CHECK: Alignment: 2
// CHECK-NEXT: ('flags', 0x2000000) // CHECK: RelocationOffset: 0x180
// CHECK-NEXT: ('reserved1', 0) // CHECK: RelocationCount: 2
// CHECK-NEXT: ('reserved2', 0) // CHECK: Type: 0x0
// CHECK-NEXT: ), // CHECK: Attributes [ (0x20000)
// CHECK-NEXT: ('_relocations', [ // CHECK: Debug (0x20000)
// CHECK-NEXT: # Relocation 0 // CHECK: ]
// CHECK-NEXT: (('word-0', 0x2c), // CHECK: Reserved1: 0x0
// CHECK-NEXT: ('word-1', 0x4000001)), // CHECK: Reserved2: 0x0
// CHECK-NEXT: # Relocation 1 // CHECK: SectionData (
// CHECK-NEXT: (('word-0', 0x1c), // CHECK: 0000: 10000000 FFFFFFFF 04000400 017C080C |.............|..|
// CHECK-NEXT: ('word-1', 0x4000001)), // CHECK: 0010: 04048801 0C000000 00000000 00000000 |................|
// CHECK-NEXT: ]) // CHECK: 0020: 00000000 0C000000 00000000 00000000 |................|
// CHECK: 0030: 06000000 |....|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Relocations [
// CHECK: Section __debug_frame {
// CHECK: 0x2C 0 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK: 0x1C 0 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK: }
// CHECK: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin10 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
.space 0x1ed280 .space 0x1ed280
.section __DATA,__const .section __DATA,__const
@ -20,17 +20,11 @@ _foo:
// so the assembler falls back to non-scattered relocations. // so the assembler falls back to non-scattered relocations.
// rdar://12358909 // rdar://12358909
// CHECK: ('_relocations', [ // CHECK: Relocations [
// CHECK: # Relocation 0 // CHECK: Section __const {
// CHECK: (('word-0', 0x5181034), // CHECK: 0x5181034 0 2 0 GENERIC_RELOC_VANILLA 0 __bss
// CHECK: ('word-1', 0x4000003)), // CHECK: 0x518102C 0 2 0 GENERIC_RELOC_VANILLA 0 __bss
// CHECK: # Relocation 1 // CHECK: 0x5181028 0 2 0 GENERIC_RELOC_VANILLA 0 __bss
// CHECK: (('word-0', 0x518102c), // CHECK: 0x5181020 0 2 0 GENERIC_RELOC_VANILLA 0 __bss
// CHECK: ('word-1', 0x4000003)), // CHECK: }
// CHECK: # Relocation 2 // CHECK: ]
// CHECK: (('word-0', 0x5181028),
// CHECK: ('word-1', 0x4000003)),
// CHECK: # Relocation 3
// CHECK: (('word-0', 0x5181020),
// CHECK: ('word-1', 0x4000003)),
// CHECK: ])

View File

@ -1,25 +1,35 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r -s -sd | FileCheck %s
.file 1 "foo" .file 1 "foo"
.loc 1 64 0 .loc 1 64 0
nop nop
// CHECK: # Section 1 // CHECK: Section {
// CHECK-NEXT: (('section_name', '__debug_line\x00\x00\x00\x00') // CHECK: Index: 1
// CHECK-NEXT: ('segment_name', '__DWARF\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Name: __debug_line (5F 5F 64 65 62 75 67 5F 6C 69 6E 65 00 00 00 00)
// CHECK-NEXT: ('address', 1) // CHECK: Segment: __DWARF (5F 5F 44 57 41 52 46 00 00 00 00 00 00 00 00 00)
// CHECK-NEXT: ('size', 51) // CHECK: Address: 0x1
// CHECK-NEXT: ('offset', 237) // CHECK: Size: 0x33
// CHECK-NEXT: ('alignment', 0) // CHECK: Offset: 237
// CHECK-NEXT: ('reloc_offset', 288) // CHECK: Alignment: 0
// CHECK-NEXT: ('num_reloc', 1) // CHECK: RelocationOffset: 0x120
// CHECK-NEXT: ('flags', 0x2000000) // CHECK: RelocationCount: 1
// CHECK-NEXT: ('reserved1', 0) // CHECK: Type: 0x0
// CHECK-NEXT: ('reserved2', 0) // CHECK: Attributes [ (0x20000)
// CHECK-NEXT: ), // CHECK: Debug (0x20000)
// CHECK-NEXT: ('_relocations', [ // CHECK: ]
// CHECK-NEXT: # Relocation 0 // CHECK: Reserved1: 0x0
// CHECK-NEXT: (('word-0', 0x27), // CHECK: Reserved2: 0x0
// CHECK-NEXT: ('word-1', 0x4000001)), // CHECK: SectionData (
// CHECK-NEXT: ]) // CHECK: 0000: 2F000000 02001A00 00000101 FB0E0D00 |/...............|
// CHECK-NEXT: ('_section_data', '2f000000 02001a00 00000101 fb0e0d00 01010101 00000001 00000100 666f6f00 00000000 00050200 00000003 3f010201 000101') // CHECK: 0010: 01010101 00000001 00000100 666F6F00 |............foo.|
// CHECK: 0020: 00000000 00050200 00000003 3F010201 |............?...|
// CHECK: 0030: 000101 |...|
// CHECK: )
// CHECK: }
// CHECK: ]
// CHECK: Relocations [
// CHECK: Section __debug_line {
// CHECK: 0x27 0 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK: }
// CHECK: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s | FileCheck %s
// FIXME: This is a horrible way of checking the output, we need an llvm-mc // FIXME: This is a horrible way of checking the output, we need an llvm-mc
// based 'otool'. // based 'otool'.
@ -8,20 +8,6 @@
// recomputed -- otherwise the second jump will appear to be out-of-range for a // recomputed -- otherwise the second jump will appear to be out-of-range for a
// 1-byte jump. // 1-byte jump.
// 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', 306)
// CHECK: ('offset', 340)
// CHECK: ('alignment', 4)
// CHECK: ('reloc_offset', 0)
// CHECK: ('num_reloc', 0)
// CHECK: ('flags', 0x80000400)
// CHECK: ('reserved1', 0)
// CHECK: ('reserved2', 0)
// CHECK: ),
L0: L0:
.space 0x8a, 0x90 .space 0x8a, 0x90
jmp L0 jmp L0
@ -35,3 +21,22 @@ L1:
L2: L2:
.zerofill __DATA,__bss,_sym,4,2 .zerofill __DATA,__bss,_sym,4,2
// CHECK: Section {
// CHECK-NEXT: Index: 0
// CHECK-NEXT: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
// CHECK-NEXT: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
// CHECK-NEXT: Address: 0x0
// CHECK-NEXT: Size: 0x132
// CHECK-NEXT: Offset: 340
// CHECK-NEXT: Alignment: 4
// CHECK-NEXT: RelocationOffset: 0x0
// CHECK-NEXT: RelocationCount: 0
// CHECK-NEXT: Type: 0x0
// CHECK-NEXT: Attributes [ (0x800004)
// CHECK-NEXT: PureInstructions (0x800000)
// CHECK-NEXT: SomeInstructions (0x4)
// CHECK-NEXT: ]
// CHECK-NEXT: Reserved1: 0x0
// CHECK-NEXT: Reserved2: 0x0
// CHECK-NEXT: }

View File

@ -1,30 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
// CHECK: # Relocation 0
// CHECK: (('word-0', 0xa4000010),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 1
// CHECK: (('word-0', 0xa1000000),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 2
// CHECK: (('word-0', 0xa4000008),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 3
// CHECK: (('word-0', 0xa1000000),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 4
// CHECK: (('word-0', 0xa4000004),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 5
// CHECK: (('word-0', 0xa1000000),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 6
// CHECK: (('word-0', 0xa2000000),
// CHECK: ('word-1', 0x0)),
// CHECK: # Relocation 7
// CHECK: (('word-0', 0xa1000000),
// CHECK: ('word-1', 0x0)),
// CHECK-NEXT: ])
_local_def: _local_def:
.globl _external_def .globl _external_def
@ -41,3 +15,16 @@ Ltemp:
.long _local_def - Ltemp .long _local_def - Ltemp
.long _external_def - Ltemp .long _external_def - Ltemp
// CHECK: Relocations [
// CHECK-NEXT: Section __data {
// CHECK-NEXT: 0x10 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x0
// CHECK-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x0
// CHECK-NEXT: 0x8 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x0
// CHECK-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x0
// CHECK-NEXT: 0x4 0 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x0
// CHECK-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x0
// CHECK-NEXT: 0x0 0 2 n/a GENERIC_RELOC_SECTDIFF 1 0x0
// CHECK-NEXT: 0x0 0 2 n/a GENERIC_RELOC_PAIR 1 0x0
// CHECK-NEXT: }
// CHECK-NEXT: ]

View File

@ -1,10 +1,4 @@
// RUN: llvm-mc -n -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // RUN: llvm-mc -n -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r -s -sd | FileCheck %s
// CHECK: # Relocation 0
// CHECK: (('word-0', 0x1),
// CHECK: ('word-1', 0x5000002)),
// CHECK-NEXT: ])
// CHECK: ('_section_data', 'e8fbffff ff')
.data .data
.long 0 .long 0
@ -15,3 +9,28 @@ _b:
call _a call _a
.subsections_via_symbols .subsections_via_symbols
// CHECK: Section {
// CHECK: Index: 0
// 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: 0x0
// CHECK: Size: 0x4
// CHECK: Offset: 340
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
// CHECK: Type: 0x0
// CHECK: Attributes [ (0x0)
// CHECK: ]
// CHECK: Reserved1: 0x0
// CHECK: Reserved2: 0x0
// CHECK: SectionData (
// CHECK: 0000: 00000000 |....|
// CHECK: )
// CHECK: }
// CHECK: Relocations [
// CHECK: Section __text {
// CHECK: 0x1 1 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK: }
// CHECK: ]

View File

@ -1,39 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -r | FileCheck %s
// CHECK: # Relocation 0
// CHECK: (('word-0', 0xe4000045),
// CHECK: ('word-1', 0x4)),
// CHECK: # Relocation 1
// CHECK: (('word-0', 0xe1000000),
// CHECK: ('word-1', 0x6)),
// CHECK: # Relocation 2
// CHECK: (('word-0', 0x40),
// CHECK: ('word-1', 0xd000003)),
// CHECK: # Relocation 3
// CHECK: (('word-0', 0x3b),
// CHECK: ('word-1', 0xd000003)),
// CHECK: # Relocation 4
// CHECK: (('word-0', 0x36),
// CHECK: ('word-1', 0xd000003)),
// CHECK: # Relocation 5
// CHECK: (('word-0', 0xe0000031),
// CHECK: ('word-1', 0x4)),
// CHECK: # Relocation 6
// CHECK: (('word-0', 0xe000002c),
// CHECK: ('word-1', 0x4)),
// CHECK: # Relocation 7
// CHECK: (('word-0', 0x27),
// CHECK: ('word-1', 0x5000001)),
// CHECK: # Relocation 8
// CHECK: (('word-0', 0xe0000022),
// CHECK: ('word-1', 0x2)),
// CHECK: # Relocation 9
// CHECK: (('word-0', 0xe000001d),
// CHECK: ('word-1', 0x2)),
// CHECK: # Relocation 10
// CHECK: (('word-0', 0x18),
// CHECK: ('word-1', 0x5000001)),
// CHECK-NEXT: ])
xorl %eax,%eax xorl %eax,%eax
@ -63,3 +28,19 @@ L1:
call _b - L0 call _b - L0
.subsections_via_symbols .subsections_via_symbols
// CHECK: Relocations [
// CHECK-NEXT: Section __text {
// CHECK-NEXT: 0x45 1 2 n/a GENERIC_RELOC_LOCAL_SECTDIFF 1 0x4
// CHECK-NEXT: 0x0 1 2 n/a GENERIC_RELOC_PAIR 1 0x6
// CHECK-NEXT: 0x40 1 2 1 GENERIC_RELOC_VANILLA 0 _c
// CHECK-NEXT: 0x3B 1 2 1 GENERIC_RELOC_VANILLA 0 _c
// CHECK-NEXT: 0x36 1 2 1 GENERIC_RELOC_VANILLA 0 _c
// CHECK-NEXT: 0x31 1 2 n/a GENERIC_RELOC_VANILLA 1 0x4
// CHECK-NEXT: 0x2C 1 2 n/a GENERIC_RELOC_VANILLA 1 0x4
// CHECK-NEXT: 0x27 1 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK-NEXT: 0x22 1 2 n/a GENERIC_RELOC_VANILLA 1 0x2
// CHECK-NEXT: 0x1D 1 2 n/a GENERIC_RELOC_VANILLA 1 0x2
// CHECK-NEXT: 0x18 1 2 0 GENERIC_RELOC_VANILLA 0 __text
// CHECK-NEXT: }
// CHECK-NEXT: ]

View File

@ -1,7 +1,10 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o %t // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o %t
// RUN: macho-dump %t | FileCheck %s // RUN: llvm-readobj -s -sd %t | FileCheck %s
// CHECK: # Section 1
// CHECK: ('flags', 0x0)
.section __TEXT,__objc_opt_ro .section __TEXT,__objc_opt_ro
.long 0 .long 0
// CHECK: Section {
// CHECK: Index: 1
// CHECK: Attributes [ (0x0)
// CHECK: ]

View File

@ -1,14 +1,49 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s -sd | FileCheck %s
//
// CHECK: # Section 0
// CHECK: 'section_name', '__text
// CHECK: 'flags', 0x80000000
// CHECK: # Section 1
// CHECK: 'section_name', '__data
// CHECK: 'flags', 0x400
.text .text
.data .data
f0: f0:
movl $0, %eax movl $0, %eax
// 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: 0x0
// CHECK: Offset: 340
// 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: )
// CHECK: }
// CHECK: Section {
// CHECK: Index: 1
// 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: 0x0
// CHECK: Size: 0x5
// CHECK: Offset: 340
// CHECK: Alignment: 0
// CHECK: RelocationOffset: 0x0
// CHECK: RelocationCount: 0
// CHECK: Type: 0x0
// CHECK: Attributes [ (0x4)
// CHECK: SomeInstructions (0x4)
// CHECK: ]
// CHECK: Reserved1: 0x0
// CHECK: Reserved2: 0x0
// CHECK: SectionData (
// CHECK: 0000: B8000000 00 |.....|
// CHECK: )
// CHECK: }
// CHECK: ]

View File

@ -1,33 +1,27 @@
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -save-temp-labels -o - | macho-dump --dump-section-data | FileCheck %s // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -save-temp-labels -o - | llvm-readobj -t | FileCheck %s
// CHECK: # Load Command 2
// CHECK: (('command', 2)
// CHECK: ('size', 24)
// CHECK: ('symoff', 312)
// CHECK: ('nsyms', 2)
// CHECK: ('stroff', 344)
// CHECK: ('strsize', 8)
// CHECK: ('_string_data', '\x00_f0\x00L0\x00')
// CHECK: ('_symbols', [
// CHECK: # Symbol 0
// CHECK: (('n_strx', 1)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 1)
// CHECK: ('n_desc', 0)
// CHECK: ('n_value', 0)
// CHECK: ('_string', '_f0')
// CHECK: ),
// CHECK: # Symbol 1
// CHECK: (('n_strx', 5)
// CHECK: ('n_type', 0xe)
// CHECK: ('n_sect', 1)
// CHECK: ('n_desc', 0)
// CHECK: ('n_value', 4)
// CHECK: ('_string', 'L0')
// CHECK: ),
// CHECK: ])
// CHECK: ),
_f0: _f0:
.long 0 .long 0
L0: L0:
.long 0 .long 0
// CHECK: Symbols [
// CHECK: Symbol {
// CHECK: Name: _f0 (1)
// CHECK: Type: Section (0xE)
// CHECK: Section: __text (0x1)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x0
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: L0 (5)
// CHECK: Type: Section (0xE)
// CHECK: Section: __text (0x1)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x4
// CHECK: }
// CHECK: ]

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -s -sd | FileCheck %s
// rdar://15526046 // rdar://15526046
@ -24,4 +24,8 @@ _key64b_9:
// be relocated, in this case _key64b_9+4, value correct in the instruction. // be relocated, in this case _key64b_9+4, value correct in the instruction.
// 01020f55 c7056475530100000000 movl $0x0, 0x1537564 // 01020f55 c7056475530100000000 movl $0x0, 0x1537564
// CHECK: 90c70564 75530100 000000') // CHECK: SectionData (
// CHECK: F75530: 90909090 90909090 90909090 90909090 |................|
// CHECK: 1020F50: 90909090 90C70564 75530100 000000 |.......duS.....|
// CHECK: 75530: 00000000 00000000 00000000 00000000 |................|
// CHECK: )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r -t | FileCheck %s
// rdar://9906375 // rdar://9906375
.org 0x100 .org 0x100
@ -7,15 +7,31 @@ _bar = _foo + 2
_baz: _baz:
leaq _bar(%rip), %rcx leaq _bar(%rip), %rcx
// CHECK: ('_relocations', [ // CHECK: File: <stdin>
// CHECK-NEXT: # Relocation 0 // CHECK-NEXT: Format: Mach-O 64-bit x86-64
// CHECK-NEXT: (('word-0', 0x103), // CHECK-NEXT: Arch: x86_64
// CHECK-NEXT: ('word-1', 0x1d000001)) // CHECK-NEXT: AddressSize: 64bit
// CHECK-NEXT: Relocations [
// CHECK: # Symbol 1 // CHECK-NEXT: Section __text {
// CHECK-NEXT: (('n_strx', 6) // CHECK-NEXT: 0x103 1 2 1 X86_64_RELOC_SIGNED 0 _bar
// CHECK-NEXT: ('n_type', 0xe) // CHECK-NEXT: }
// CHECK-NEXT: ('n_sect', 1) // CHECK-NEXT: ]
// CHECK-NEXT: ('n_desc', 0) // CHECK-NEXT: Symbols [
// CHECK-NEXT: ('n_value', 258) // CHECK-NEXT: Symbol {
// CHECK-NEXT: ('_string', '_bar') // CHECK-NEXT: Name: _foo (11)
// CHECK-NEXT: Type: Section (0xE)
// CHECK-NEXT: Section: __text (0x1)
// CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
// CHECK-NEXT: Flags [ (0x0)
// CHECK-NEXT: ]
// CHECK-NEXT: Value: 0x100
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: _bar (6)
// CHECK-NEXT: Type: Section (0xE)
// CHECK-NEXT: Section: __text (0x1)
// CHECK-NEXT: RefType: UndefinedNonLazy (0x0)
// CHECK-NEXT: Flags [ (0x0)
// CHECK-NEXT: ]
// CHECK-NEXT: Value: 0x102
// CHECK-NEXT: }

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // 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 .text
.byte 0 // Align to 2**3 bytes, not 2**1 .byte 0 // Align to 2**3 bytes, not 2**1
@ -8,114 +8,124 @@
.data .data
.align 3 .align 3
// CHECK: ('cputype', 7) // CHECK: File: <stdin>
// CHECK: ('cpusubtype', 3) // CHECK: Format: Mach-O 32-bit i386
// CHECK: ('filetype', 1) // CHECK: Arch: i386
// CHECK: ('num_load_commands', 4) // CHECK: AddressSize: 32bit
// CHECK: ('load_commands_size', 380) // CHECK: MachHeader {
// CHECK: ('flag', 0) // CHECK: Magic: Magic (0xFEEDFACE)
// CHECK: ('load_commands', [ // CHECK: CpuType: X86 (0x7)
// CHECK: # Load Command 0 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
// CHECK: (('command', 1) // CHECK: FileType: Relocatable (0x1)
// CHECK: ('size', 260) // CHECK: NumOfLoadCommands: 4
// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: SizeOfLoadCommands: 380
// CHECK: ('vm_addr', 0) // CHECK: Flags [ (0x0)
// CHECK: ('vm_size', 10) // CHECK: ]
// CHECK: ('file_offset', 408) // CHECK: }
// CHECK: ('file_size', 8) // CHECK: Sections [
// CHECK: ('maxprot', 7) // CHECK: Section {
// CHECK: ('initprot', 7) // CHECK: Index: 0
// CHECK: ('num_sections', 3) // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('flags', 0) // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('sections', [ // CHECK: Address: 0x0
// CHECK: # Section 0 // CHECK: Size: 0x1
// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Offset: 408
// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Alignment: 0
// CHECK: ('address', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('size', 1) // CHECK: RelocationCount: 0
// CHECK: ('offset', 408) // CHECK: Type: 0x0
// CHECK: ('alignment', 0) // CHECK: Attributes [ (0x800000)
// CHECK: ('reloc_offset', 0) // CHECK: PureInstructions (0x800000)
// CHECK: ('num_reloc', 0) // CHECK: ]
// CHECK: ('flags', 0x80000000) // CHECK: Reserved1: 0x0
// CHECK: ('reserved1', 0) // CHECK: Reserved2: 0x0
// CHECK: ('reserved2', 0) // CHECK: SectionData (
// CHECK: ), // CHECK: 0000: 00 |.|
// CHECK: ('_relocations', [ // CHECK: )
// CHECK: ]) // CHECK: }
// CHECK: # Section 1 // CHECK: Section {
// CHECK: (('section_name', '__common\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Index: 1
// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Name: __common (5F 5F 63 6F 6D 6D 6F 6E 00 00 00 00 00 00 00 00)
// CHECK: ('address', 8) // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('size', 2) // CHECK: Address: 0x8
// CHECK: ('offset', 0) // CHECK: Size: 0x2
// CHECK: ('alignment', 1) // CHECK: Offset: 0
// CHECK: ('reloc_offset', 0) // CHECK: Alignment: 1
// CHECK: ('num_reloc', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('flags', 0x1) // CHECK: RelocationCount: 0
// CHECK: ('reserved1', 0) // CHECK: Type: LocReloc (0x1)
// CHECK: ('reserved2', 0) // CHECK: Attributes [ (0x0)
// CHECK: ), // CHECK: ]
// CHECK: ('_relocations', [ // CHECK: Reserved1: 0x0
// CHECK: ]) // CHECK: Reserved2: 0x0
// CHECK: # Section 2 // CHECK: }
// CHECK: (('section_name', '__data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Section {
// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Index: 2
// CHECK: ('address', 8) // CHECK: Name: __data (5F 5F 64 61 74 61 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('size', 0) // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('offset', 416) // CHECK: Address: 0x8
// CHECK: ('alignment', 3) // CHECK: Size: 0x0
// CHECK: ('reloc_offset', 0) // CHECK: Offset: 416
// CHECK: ('num_reloc', 0) // CHECK: Alignment: 3
// CHECK: ('flags', 0x0) // CHECK: RelocationOffset: 0x0
// CHECK: ('reserved1', 0) // CHECK: RelocationCount: 0
// CHECK: ('reserved2', 0) // CHECK: Type: 0x0
// CHECK: ), // CHECK: Attributes [ (0x0)
// CHECK: ('_relocations', [ // CHECK: ]
// CHECK: ]) // CHECK: Reserved1: 0x0
// CHECK: ]) // CHECK: Reserved2: 0x0
// CHECK: ), // CHECK: SectionData (
// CHECK: # Load Command 2 // CHECK: )
// CHECK: (('command', 2) // CHECK: }
// CHECK: ('size', 24) // CHECK: ]
// CHECK: ('symoff', 416) // CHECK: Relocations [
// CHECK: ('nsyms', 1) // CHECK: ]
// CHECK: ('stroff', 428) // CHECK: Symbols [
// CHECK: ('strsize', 8) // CHECK: Symbol {
// CHECK: ('_string_data', '\x00zfill\x00\x00') // CHECK: Name: zfill (1)
// CHECK: ('_symbols', [ // CHECK: Type: Section (0xE)
// CHECK: # Symbol 0 // CHECK: Section: __common (0x2)
// CHECK: (('n_strx', 1) // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('n_type', 0xe) // CHECK: Flags [ (0x0)
// CHECK: ('n_sect', 2) // CHECK: ]
// CHECK: ('n_desc', 0) // CHECK: Value: 0x8
// CHECK: ('n_value', 8) // CHECK: }
// CHECK: ('_string', 'zfill') // CHECK: ]
// CHECK: ), // CHECK: Indirect Symbols {
// CHECK: ]) // CHECK: Number: 0
// CHECK: ), // CHECK: Symbols [
// CHECK: # Load Command 3 // CHECK: ]
// CHECK: (('command', 11) // CHECK: }
// CHECK: ('size', 80) // CHECK: Segment {
// CHECK: ('ilocalsym', 0) // CHECK: Cmd: LC_SEGMENT
// CHECK: ('nlocalsym', 1) // CHECK: Name:
// CHECK: ('iextdefsym', 1) // CHECK: Size: 260
// CHECK: ('nextdefsym', 0) // CHECK: vmaddr: 0x0
// CHECK: ('iundefsym', 1) // CHECK: vmsize: 0xA
// CHECK: ('nundefsym', 0) // CHECK: fileoff: 408
// CHECK: ('tocoff', 0) // CHECK: filesize: 8
// CHECK: ('ntoc', 0) // CHECK: maxprot: rwx
// CHECK: ('modtaboff', 0) // CHECK: initprot: rwx
// CHECK: ('nmodtab', 0) // CHECK: nsects: 3
// CHECK: ('extrefsymoff', 0) // CHECK: flags: 0x0
// CHECK: ('nextrefsyms', 0) // CHECK: }
// CHECK: ('indirectsymoff', 0) // CHECK: Dysymtab {
// CHECK: ('nindirectsyms', 0) // CHECK: ilocalsym: 0
// CHECK: ('extreloff', 0) // CHECK: nlocalsym: 1
// CHECK: ('nextrel', 0) // CHECK: iextdefsym: 1
// CHECK: ('locreloff', 0) // CHECK: nextdefsym: 0
// CHECK: ('nlocrel', 0) // CHECK: iundefsym: 1
// CHECK: ('_indirect_symbols', [ // CHECK: nundefsym: 0
// CHECK: ]) // CHECK: tocoff: 0
// CHECK: ), // CHECK: ntoc: 0
// CHECK: ]) // 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: }

View File

@ -1,103 +1,110 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // 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
.byte 0 .byte 0
// This file has size 2, the tail padding doesn't count. // This file has size 2, the tail padding doesn't count.
.zerofill __DATA, __bss, sym_a, 1 .zerofill __DATA, __bss, sym_a, 1
// CHECK: ('cputype', 7) // CHECK: File: <stdin>
// CHECK: ('cpusubtype', 3) // CHECK: Format: Mach-O 32-bit i386
// CHECK: ('filetype', 1) // CHECK: Arch: i386
// CHECK: ('num_load_commands', 4) // CHECK: AddressSize: 32bit
// CHECK: ('load_commands_size', 312) // CHECK: MachHeader {
// CHECK: ('flag', 0) // CHECK: Magic: Magic (0xFEEDFACE)
// CHECK: ('load_commands', [ // CHECK: CpuType: X86 (0x7)
// CHECK: # Load Command 0 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
// CHECK: (('command', 1) // CHECK: FileType: Relocatable (0x1)
// CHECK: ('size', 192) // CHECK: NumOfLoadCommands: 4
// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: SizeOfLoadCommands: 312
// CHECK: ('vm_addr', 0) // CHECK: Flags [ (0x0)
// CHECK: ('vm_size', 2) // CHECK: ]
// CHECK: ('file_offset', 340) // CHECK: }
// CHECK: ('file_size', 1) // CHECK: Sections [
// CHECK: ('maxprot', 7) // CHECK: Section {
// CHECK: ('initprot', 7) // CHECK: Index: 0
// CHECK: ('num_sections', 2) // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('flags', 0) // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('sections', [ // CHECK: Address: 0x0
// CHECK: # Section 0 // CHECK: Size: 0x1
// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Offset: 340
// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Alignment: 0
// CHECK: ('address', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('size', 1) // CHECK: RelocationCount: 0
// CHECK: ('offset', 340) // CHECK: Type: 0x0
// CHECK: ('alignment', 0) // CHECK: Attributes [ (0x800000)
// CHECK: ('reloc_offset', 0) // CHECK: PureInstructions (0x800000)
// CHECK: ('num_reloc', 0) // CHECK: ]
// CHECK: ('flags', 0x80000000) // CHECK: Reserved1: 0x0
// CHECK: ('reserved1', 0) // CHECK: Reserved2: 0x0
// CHECK: ('reserved2', 0) // CHECK: SectionData (
// CHECK: ), // CHECK: 0000: 00 |.|
// CHECK: ('_relocations', [ // CHECK: )
// CHECK: ]) // CHECK: }
// CHECK: # Section 1 // CHECK: Section {
// CHECK: (('section_name', '__bss\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Index: 1
// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('address', 1) // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('size', 1) // CHECK: Address: 0x1
// CHECK: ('offset', 0) // CHECK: Size: 0x1
// CHECK: ('alignment', 0) // CHECK: Offset: 0
// CHECK: ('reloc_offset', 0) // CHECK: Alignment: 0
// CHECK: ('num_reloc', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('flags', 0x1) // CHECK: RelocationCount: 0
// CHECK: ('reserved1', 0) // CHECK: Type: LocReloc (0x1)
// CHECK: ('reserved2', 0) // CHECK: Attributes [ (0x0)
// CHECK: ), // CHECK: ]
// CHECK: ('_relocations', [ // CHECK: Reserved1: 0x0
// CHECK: ]) // CHECK: Reserved2: 0x0
// CHECK: ]) // CHECK: }
// CHECK: ), // CHECK: ]
// CHECK: # Load Command 2 // CHECK: Relocations [
// CHECK: (('command', 2) // CHECK: ]
// CHECK: ('size', 24) // CHECK: Symbols [
// CHECK: ('symoff', 344) // CHECK: Symbol {
// CHECK: ('nsyms', 1) // CHECK: Name: sym_a (1)
// CHECK: ('stroff', 356) // CHECK: Type: Section (0xE)
// CHECK: ('strsize', 8) // CHECK: Section: __bss (0x2)
// CHECK: ('_string_data', '\x00sym_a\x00\x00') // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('_symbols', [ // CHECK: Flags [ (0x0)
// CHECK: # Symbol 0 // CHECK: ]
// CHECK: (('n_strx', 1) // CHECK: Value: 0x1
// CHECK: ('n_type', 0xe) // CHECK: }
// CHECK: ('n_sect', 2) // CHECK: ]
// CHECK: ('n_desc', 0) // CHECK: Indirect Symbols {
// CHECK: ('n_value', 1) // CHECK: Number: 0
// CHECK: ('_string', 'sym_a') // CHECK: Symbols [
// CHECK: ), // CHECK: ]
// CHECK: ]) // CHECK: }
// CHECK: ), // CHECK: Segment {
// CHECK: # Load Command 3 // CHECK: Cmd: LC_SEGMENT
// CHECK: (('command', 11) // CHECK: Name:
// CHECK: ('size', 80) // CHECK: Size: 192
// CHECK: ('ilocalsym', 0) // CHECK: vmaddr: 0x0
// CHECK: ('nlocalsym', 1) // CHECK: vmsize: 0x2
// CHECK: ('iextdefsym', 1) // CHECK: fileoff: 340
// CHECK: ('nextdefsym', 0) // CHECK: filesize: 1
// CHECK: ('iundefsym', 1) // CHECK: maxprot: rwx
// CHECK: ('nundefsym', 0) // CHECK: initprot: rwx
// CHECK: ('tocoff', 0) // CHECK: nsects: 2
// CHECK: ('ntoc', 0) // CHECK: flags: 0x0
// CHECK: ('modtaboff', 0) // CHECK: }
// CHECK: ('nmodtab', 0) // CHECK: Dysymtab {
// CHECK: ('extrefsymoff', 0) // CHECK: ilocalsym: 0
// CHECK: ('nextrefsyms', 0) // CHECK: nlocalsym: 1
// CHECK: ('indirectsymoff', 0) // CHECK: iextdefsym: 1
// CHECK: ('nindirectsyms', 0) // CHECK: nextdefsym: 0
// CHECK: ('extreloff', 0) // CHECK: iundefsym: 1
// CHECK: ('nextrel', 0) // CHECK: nundefsym: 0
// CHECK: ('locreloff', 0) // CHECK: tocoff: 0
// CHECK: ('nlocrel', 0) // CHECK: ntoc: 0
// CHECK: ('_indirect_symbols', [ // CHECK: modtaboff: 0
// CHECK: ]) // CHECK: nmodtab: 0
// CHECK: ), // CHECK: extrefsymoff: 0
// CHECK: ]) // CHECK: nextrefsyms: 0
// CHECK: indirectsymoff: 0
// CHECK: nindirectsyms: 0
// CHECK: extreloff: 0
// CHECK: nextrel: 0
// CHECK: locreloff: 0
// CHECK: nlocrel: 0
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump --dump-section-data | FileCheck %s // 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
// FIXME: We don't get the order right currently, the assembler first // FIXME: We don't get the order right currently, the assembler first
// orders the symbols, then assigns addresses. :( // orders the symbols, then assigns addresses. :(
@ -19,123 +19,134 @@
.lcomm sym_lcomm_B, 4 .lcomm sym_lcomm_B, 4
.endif .endif
// CHECK: ('cputype', 7) // CHECK: File: <stdin>
// CHECK: ('cpusubtype', 3) // CHECK: Format: Mach-O 32-bit i386
// CHECK: ('filetype', 1) // CHECK: Arch: i386
// CHECK: ('num_load_commands', 4) // CHECK: AddressSize: 32bit
// CHECK: ('load_commands_size', 312) // CHECK: MachHeader {
// CHECK: ('flag', 0) // CHECK: Magic: Magic (0xFEEDFACE)
// CHECK: ('load_commands', [ // CHECK: CpuType: X86 (0x7)
// CHECK: # Load Command 0 // CHECK: CpuSubType: CPU_SUBTYPE_I386_ALL (0x3)
// CHECK: (('command', 1) // CHECK: FileType: Relocatable (0x1)
// CHECK: ('size', 192) // CHECK: NumOfLoadCommands: 4
// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: SizeOfLoadCommands: 312
// CHECK: ('vm_addr', 0) // CHECK: Flags [ (0x0)
// CHECK: ('vm_size', 16) // CHECK: ]
// CHECK: ('file_offset', 340) // CHECK: }
// CHECK: ('file_size', 0) // CHECK: Sections [
// CHECK: ('maxprot', 7) // CHECK: Section {
// CHECK: ('initprot', 7) // CHECK: Index: 0
// CHECK: ('num_sections', 2) // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('flags', 0) // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('sections', [ // CHECK: Address: 0x0
// CHECK: # Section 0 // CHECK: Size: 0x0
// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Offset: 340
// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Alignment: 0
// CHECK: ('address', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('size', 0) // CHECK: RelocationCount: 0
// CHECK: ('offset', 340) // CHECK: Type: 0x0
// CHECK: ('alignment', 0) // CHECK: Attributes [ (0x800000)
// CHECK: ('reloc_offset', 0) // CHECK: PureInstructions (0x800000)
// CHECK: ('num_reloc', 0) // CHECK: ]
// CHECK: ('flags', 0x80000000) // CHECK: Reserved1: 0x0
// CHECK: ('reserved1', 0) // CHECK: Reserved2: 0x0
// CHECK: ('reserved2', 0) // CHECK: SectionData (
// CHECK: ), // CHECK: )
// CHECK: ('_relocations', [ // CHECK: }
// CHECK: ]) // CHECK: Section {
// CHECK: # Section 1 // CHECK: Index: 1
// CHECK: (('section_name', '__bss\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('address', 0) // CHECK: Address: 0x0
// CHECK: ('size', 16) // CHECK: Size: 0x10
// CHECK: ('offset', 0) // CHECK: Offset: 0
// CHECK: ('alignment', 4) // CHECK: Alignment: 4
// CHECK: ('reloc_offset', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('num_reloc', 0) // CHECK: RelocationCount: 0
// CHECK: ('flags', 0x1) // CHECK: Type: LocReloc (0x1)
// CHECK: ('reserved1', 0) // CHECK: Attributes [ (0x0)
// CHECK: ('reserved2', 0) // CHECK: ]
// CHECK: ), // CHECK: Reserved1: 0x0
// CHECK: ('_relocations', [ // CHECK: Reserved2: 0x0
// CHECK: ]) // CHECK: }
// CHECK: ]) // CHECK: ]
// CHECK: ), // CHECK: Relocations [
// CHECK: # Load Command 2 // CHECK: ]
// CHECK: (('command', 2) // CHECK: Symbols [
// CHECK: ('size', 24) // CHECK: Symbol {
// CHECK: ('symoff', 340) // CHECK: Name: sym_lcomm_A (37)
// CHECK: ('nsyms', 4) // CHECK: Type: Section (0xE)
// CHECK: ('stroff', 388) // CHECK: Section: __bss (0x2)
// CHECK: ('strsize', 52) // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('_string_data', '\x00sym_lcomm_D\x00sym_lcomm_C\x00sym_lcomm_B\x00sym_lcomm_A\x00\x00\x00\x00') // CHECK: Flags [ (0x0)
// CHECK: ('_symbols', [ // CHECK: ]
// CHECK: # Symbol 0 // CHECK: Value: 0x8
// CHECK: (('n_strx', 37) // CHECK: }
// CHECK: ('n_type', 0xe) // CHECK: Symbol {
// CHECK: ('n_sect', 2) // CHECK: Name: sym_lcomm_B (25)
// CHECK: ('n_desc', 0) // CHECK: Type: Section (0xE)
// CHECK: ('n_value', 8) // CHECK: Section: __bss (0x2)
// CHECK: ('_string', 'sym_lcomm_A') // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ), // CHECK: Flags [ (0x0)
// CHECK: # Symbol 1 // CHECK: ]
// CHECK: (('n_strx', 25) // CHECK: Value: 0xC
// CHECK: ('n_type', 0xe) // CHECK: }
// CHECK: ('n_sect', 2) // CHECK: Symbol {
// CHECK: ('n_desc', 0) // CHECK: Name: sym_lcomm_C (13)
// CHECK: ('n_value', 12) // CHECK: Extern
// CHECK: ('_string', 'sym_lcomm_B') // CHECK: Type: Section (0xE)
// CHECK: ), // CHECK: Section: __bss (0x2)
// CHECK: # Symbol 2 // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: (('n_strx', 13) // CHECK: Flags [ (0x0)
// CHECK: ('n_type', 0xf) // CHECK: ]
// CHECK: ('n_sect', 2) // CHECK: Value: 0x0
// CHECK: ('n_desc', 0) // CHECK: }
// CHECK: ('n_value', 0) // CHECK: Symbol {
// CHECK: ('_string', 'sym_lcomm_C') // CHECK: Name: sym_lcomm_D (1)
// CHECK: ), // CHECK: Extern
// CHECK: # Symbol 3 // CHECK: Type: Section (0xE)
// CHECK: (('n_strx', 1) // CHECK: Section: __bss (0x2)
// CHECK: ('n_type', 0xf) // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('n_sect', 2) // CHECK: Flags [ (0x0)
// CHECK: ('n_desc', 0) // CHECK: ]
// CHECK: ('n_value', 4) // CHECK: Value: 0x4
// CHECK: ('_string', 'sym_lcomm_D') // CHECK: }
// CHECK: ), // CHECK: ]
// CHECK: ]) // CHECK: Indirect Symbols {
// CHECK: ), // CHECK: Number: 0
// CHECK: # Load Command 3 // CHECK: Symbols [
// CHECK: (('command', 11) // CHECK: ]
// CHECK: ('size', 80) // CHECK: }
// CHECK: ('ilocalsym', 0) // CHECK: Segment {
// CHECK: ('nlocalsym', 2) // CHECK: Cmd: LC_SEGMENT
// CHECK: ('iextdefsym', 2) // CHECK: Name:
// CHECK: ('nextdefsym', 2) // CHECK: Size: 192
// CHECK: ('iundefsym', 4) // CHECK: vmaddr: 0x0
// CHECK: ('nundefsym', 0) // CHECK: vmsize: 0x10
// CHECK: ('tocoff', 0) // CHECK: fileoff: 340
// CHECK: ('ntoc', 0) // CHECK: filesize: 0
// CHECK: ('modtaboff', 0) // CHECK: maxprot: rwx
// CHECK: ('nmodtab', 0) // CHECK: initprot: rwx
// CHECK: ('extrefsymoff', 0) // CHECK: nsects: 2
// CHECK: ('nextrefsyms', 0) // CHECK: flags: 0x0
// CHECK: ('indirectsymoff', 0) // CHECK: }
// CHECK: ('nindirectsyms', 0) // CHECK: Dysymtab {
// CHECK: ('extreloff', 0) // CHECK: ilocalsym: 0
// CHECK: ('nextrel', 0) // CHECK: nlocalsym: 2
// CHECK: ('locreloff', 0) // CHECK: iextdefsym: 2
// CHECK: ('nlocrel', 0) // CHECK: nextdefsym: 2
// CHECK: ('_indirect_symbols', [ // CHECK: iundefsym: 4
// CHECK: ]) // CHECK: nundefsym: 0
// CHECK: ), // CHECK: tocoff: 0
// CHECK: ]) // 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: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
.zerofill __DATA,__bss,_fill0,1,0 .zerofill __DATA,__bss,_fill0,1,0
.zerofill __DATA,__bss,_a,4,2 .zerofill __DATA,__bss,_a,4,2
@ -9,27 +9,81 @@
.zerofill __DATA,__bss,_fill3,1,0 .zerofill __DATA,__bss,_fill3,1,0
.zerofill __DATA,__bss,_d,4,5 .zerofill __DATA,__bss,_d,4,5
// CHECK: # Symbol 0 // CHECK: File: <stdin>
// CHECK: ('n_value', 0) // CHECK: Format: Mach-O 32-bit i386
// CHECK: ('_string', '_fill0') // CHECK: Arch: i386
// CHECK: # Symbol 1 // CHECK: AddressSize: 32bit
// CHECK: ('n_value', 4) // CHECK: Symbols [
// CHECK: ('_string', '_a') // CHECK: Symbol {
// CHECK: # Symbol 2 // CHECK: Name: _fill0 (34)
// CHECK: ('n_value', 8) // CHECK: Type: Section (0xE)
// CHECK: ('_string', '_fill1') // CHECK: Section: __bss (0x2)
// CHECK: # Symbol 3 // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('n_value', 16) // CHECK: Flags [ (0x0)
// CHECK: ('_string', '_b') // CHECK: ]
// CHECK: # Symbol 4 // CHECK: Value: 0x0
// CHECK: ('n_value', 20) // CHECK: }
// CHECK: ('_string', '_fill2') // CHECK: Symbol {
// CHECK: # Symbol 5 // CHECK: Name: _a (10)
// CHECK: ('n_value', 32) // CHECK: Type: Section (0xE)
// CHECK: ('_string', '_c') // CHECK: Section: __bss (0x2)
// CHECK: # Symbol 6 // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('n_value', 36) // CHECK: Flags [ (0x0)
// CHECK: ('_string', '_fill3') // CHECK: ]
// CHECK: # Symbol 7 // CHECK: Value: 0x4
// CHECK: ('n_value', 64) // CHECK: }
// CHECK: ('_string', '_d') // CHECK: Symbol {
// CHECK: Name: _fill1 (27)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x8
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _b (7)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x10
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _fill2 (20)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x14
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _c (4)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x20
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _fill3 (13)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x24
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _d (1)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x40
// CHECK: }
// CHECK: ]

View File

@ -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 .text
.align 3 .align 3
@ -6,104 +6,109 @@
.zerofill __DATA,__bss,_g0,8,3 .zerofill __DATA,__bss,_g0,8,3
// CHECK: ('cputype', 16777223) // CHECK: File: <stdin>
// CHECK: ('cpusubtype', 3) // CHECK: Format: Mach-O 64-bit x86-64
// CHECK: ('filetype', 1) // CHECK: Arch: x86_64
// CHECK: ('num_load_commands', 4) // CHECK: AddressSize: 64bit
// CHECK: ('load_commands_size', 352) // CHECK: MachHeader {
// CHECK: ('flag', 0) // CHECK: Magic: Magic64 (0xFEEDFACF)
// CHECK: ('reserved', 0) // CHECK: CpuType: X86-64 (0x1000007)
// CHECK: ('load_commands', [ // CHECK: CpuSubType: CPU_SUBTYPE_X86_64_ALL (0x3)
// CHECK: # Load Command 0 // CHECK: FileType: Relocatable (0x1)
// CHECK: (('command', 25) // CHECK: NumOfLoadCommands: 4
// CHECK: ('size', 232) // CHECK: SizeOfLoadCommands: 352
// CHECK: ('segment_name', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Flags [ (0x0)
// CHECK: ('vm_addr', 0) // CHECK: ]
// CHECK: ('vm_size', 16) // CHECK: Reserved: 0x0
// CHECK: ('file_offset', 384) // CHECK: }
// CHECK: ('file_size', 4) // CHECK: Sections [
// CHECK: ('maxprot', 7) // CHECK: Section {
// CHECK: ('initprot', 7) // CHECK: Index: 0
// CHECK: ('num_sections', 2) // CHECK: Name: __text (5F 5F 74 65 78 74 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('flags', 0) // CHECK: Segment: __TEXT (5F 5F 54 45 58 54 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('sections', [ // CHECK: Address: 0x0
// CHECK: # Section 0 // CHECK: Size: 0x4
// CHECK: (('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Offset: 384
// CHECK: ('segment_name', '__TEXT\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Alignment: 3
// CHECK: ('address', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('size', 4) // CHECK: RelocationCount: 0
// CHECK: ('offset', 384) // CHECK: Type: 0x0
// CHECK: ('alignment', 3) // CHECK: Attributes [ (0x800000)
// CHECK: ('reloc_offset', 0) // CHECK: PureInstructions (0x800000)
// CHECK: ('num_reloc', 0) // CHECK: ]
// CHECK: ('flags', 0x80000000) // CHECK: Reserved1: 0x0
// CHECK: ('reserved1', 0) // CHECK: Reserved2: 0x0
// CHECK: ('reserved2', 0) // CHECK: Reserved3: 0x0
// CHECK: ('reserved3', 0) // CHECK: SectionData (
// CHECK: ), // CHECK: 0000: 02000000 |....|
// CHECK: ('_relocations', [ // CHECK: )
// CHECK: ]) // CHECK: }
// CHECK: ('_section_data', '02000000') // CHECK: Section {
// CHECK: # Section 1 // CHECK: Index: 1
// CHECK: (('section_name', '__bss\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Name: __bss (5F 5F 62 73 73 00 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('segment_name', '__DATA\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') // CHECK: Segment: __DATA (5F 5F 44 41 54 41 00 00 00 00 00 00 00 00 00 00)
// CHECK: ('address', 8) // CHECK: Address: 0x8
// CHECK: ('size', 8) // CHECK: Size: 0x8
// CHECK: ('offset', 0) // CHECK: Offset: 0
// CHECK: ('alignment', 3) // CHECK: Alignment: 3
// CHECK: ('reloc_offset', 0) // CHECK: RelocationOffset: 0x0
// CHECK: ('num_reloc', 0) // CHECK: RelocationCount: 0
// CHECK: ('flags', 0x1) // CHECK: Type: LocReloc (0x1)
// CHECK: ('reserved1', 0) // CHECK: Attributes [ (0x0)
// CHECK: ('reserved2', 0) // CHECK: ]
// CHECK: ('reserved3', 0) // CHECK: Reserved1: 0x0
// CHECK: ), // CHECK: Reserved2: 0x0
// CHECK: ('_relocations', [ // CHECK: Reserved3: 0x0
// CHECK: ]) // CHECK: }
// CHECK: ('_section_data', 'cffaedfe 07000001') // CHECK: ]
// CHECK: ]) // CHECK: Relocations [
// CHECK: ), // CHECK: ]
// CHECK: # Load Command 2 // CHECK: Symbols [
// CHECK: (('command', 2) // CHECK: Symbol {
// CHECK: ('size', 24) // CHECK: Name: _g0 (1)
// CHECK: ('symoff', 388) // CHECK: Type: Section (0xE)
// CHECK: ('nsyms', 1) // CHECK: Section: __bss (0x2)
// CHECK: ('stroff', 404) // CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: ('strsize', 8) // CHECK: Flags [ (0x0)
// CHECK: ('_string_data', '\x00_g0\x00\x00\x00\x00') // CHECK: ]
// CHECK: ('_symbols', [ // CHECK: Value: 0x8
// CHECK: # Symbol 0 // CHECK: }
// CHECK: (('n_strx', 1) // CHECK: ]
// CHECK: ('n_type', 0xe) // CHECK: Indirect Symbols {
// CHECK: ('n_sect', 2) // CHECK: Number: 0
// CHECK: ('n_desc', 0) // CHECK: Symbols [
// CHECK: ('n_value', 8) // CHECK: ]
// CHECK: ('_string', '_g0') // CHECK: }
// CHECK: ), // CHECK: Segment {
// CHECK: ]) // CHECK: Cmd: LC_SEGMENT_64
// CHECK: ), // CHECK: Name:
// CHECK: # Load Command 3 // CHECK: Size: 232
// CHECK: (('command', 11) // CHECK: vmaddr: 0x0
// CHECK: ('size', 80) // CHECK: vmsize: 0x10
// CHECK: ('ilocalsym', 0) // CHECK: fileoff: 384
// CHECK: ('nlocalsym', 1) // CHECK: filesize: 4
// CHECK: ('iextdefsym', 1) // CHECK: maxprot: rwx
// CHECK: ('nextdefsym', 0) // CHECK: initprot: rwx
// CHECK: ('iundefsym', 1) // CHECK: nsects: 2
// CHECK: ('nundefsym', 0) // CHECK: flags: 0x0
// CHECK: ('tocoff', 0) // CHECK: }
// CHECK: ('ntoc', 0) // CHECK: Dysymtab {
// CHECK: ('modtaboff', 0) // CHECK: ilocalsym: 0
// CHECK: ('nmodtab', 0) // CHECK: nlocalsym: 1
// CHECK: ('extrefsymoff', 0) // CHECK: iextdefsym: 1
// CHECK: ('nextrefsyms', 0) // CHECK: nextdefsym: 0
// CHECK: ('indirectsymoff', 0) // CHECK: iundefsym: 1
// CHECK: ('nindirectsyms', 0) // CHECK: nundefsym: 0
// CHECK: ('extreloff', 0) // CHECK: tocoff: 0
// CHECK: ('nextrel', 0) // CHECK: ntoc: 0
// CHECK: ('locreloff', 0) // CHECK: modtaboff: 0
// CHECK: ('nlocrel', 0) // CHECK: nmodtab: 0
// CHECK: ('_indirect_symbols', [ // CHECK: extrefsymoff: 0
// CHECK: ]) // CHECK: nextrefsyms: 0
// CHECK: ), // CHECK: indirectsymoff: 0
// CHECK: ]) // CHECK: nindirectsyms: 0
// CHECK: extreloff: 0
// CHECK: nextrel: 0
// CHECK: locreloff: 0
// CHECK: nlocrel: 0
// CHECK: }

View File

@ -1,4 +1,4 @@
// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | macho-dump | FileCheck %s // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
// //
// Check that the section itself is aligned. // Check that the section itself is aligned.
@ -7,9 +7,27 @@
.zerofill __DATA,__bss,_a,1,0 .zerofill __DATA,__bss,_a,1,0
.zerofill __DATA,__bss,_b,4,4 .zerofill __DATA,__bss,_b,4,4
// CHECK: # Symbol 0 // CHECK: File: <stdin>
// CHECK: ('n_value', 16) // CHECK: Format: Mach-O 32-bit i386
// CHECK: ('_string', '_a') // CHECK: Arch: i386
// CHECK: # Symbol 1 // CHECK: AddressSize: 32bit
// CHECK: ('n_value', 32) // CHECK: Symbols [
// CHECK: ('_string', '_b') // CHECK: Symbol {
// CHECK: Name: _a (4)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x10
// CHECK: }
// CHECK: Symbol {
// CHECK: Name: _b (1)
// CHECK: Type: Section (0xE)
// CHECK: Section: __bss (0x2)
// CHECK: RefType: UndefinedNonLazy (0x0)
// CHECK: Flags [ (0x0)
// CHECK: ]
// CHECK: Value: 0x20
// CHECK: }
// CHECK: ]