// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols - | FileCheck %s
_text_a:
xorl %eax,%eax
_text_b:
xorl %eax,%eax
Ltext_c:
xorl %eax,%eax
Ltext_d:
xorl %eax,%eax
movl $(_text_a - _text_b), %eax
Ltext_expr_0 = _text_a - _text_b
movl $(Ltext_expr_0), %eax
movl $(Ltext_c - _text_b), %eax
Ltext_expr_1 = Ltext_c - _text_b
movl $(Ltext_expr_1), %eax
movl $(Ltext_d - Ltext_c), %eax
Ltext_expr_2 = Ltext_d - Ltext_c
movl $(Ltext_expr_2), %eax
movl $(_text_a + Ltext_expr_0), %eax
.data
_data_a:
.long 0
_data_b:
.long 0
Ldata_c:
.long 0
Ldata_d:
.long 0
.long _data_a - _data_b
Ldata_expr_0 = _data_a - _data_b
.long Ldata_expr_0
.long Ldata_c - _data_b
Ldata_expr_1 = Ldata_c - _data_b
.long Ldata_expr_1
.long Ldata_d - Ldata_c
Ldata_expr_2 = Ldata_d - Ldata_c
.long Ldata_expr_2
.long _data_a + Ldata_expr_0
// CHECK: File: <stdin>
// CHECK: Format: Mach-O 32-bit i386
// CHECK: Arch: i386
// CHECK: AddressSize: 32bit
// CHECK: MachHeader {
// CHECK: Magic:
// CHECK: CpuType:
// CHECK: CpuSubType:
// CHECK: FileType:
// CHECK: NumOfLoadCommands: 4
// CHECK: SizeOfLoadCommands: 312
// CHECK: Flags
// CHECK: }
// CHECK: Sections