// RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols - | FileCheck %s
// FIXME: We are missing a lot of diagnostics on this kind of stuff which the
// assembler has.
.lazy_symbol_pointer
.indirect_symbol sym_lsp_B
.long 0
.globl sym_lsp_A
.indirect_symbol sym_lsp_A
.long 0
sym_lsp_C:
.indirect_symbol sym_lsp_C
.long 0
// FIXME: Enable this test once missing llvm-mc support is in place.
.if 0
.indirect_symbol sym_lsp_D
.long sym_lsp_D
.endif
.indirect_symbol sym_lsp_E
.long 0xFA
// FIXME: Enable this test once missing llvm-mc support is in place.
.if 0
sym_lsp_F = 10
.indirect_symbol sym_lsp_F
.long 0
.endif
.globl sym_lsp_G
sym_lsp_G:
.indirect_symbol sym_lsp_G
.long 0
.non_lazy_symbol_pointer
.indirect_symbol sym_nlp_B
.long 0
.globl sym_nlp_A
.indirect_symbol sym_nlp_A
.long 0
sym_nlp_C:
.indirect_symbol sym_nlp_C
.long 0
// FIXME: Enable this test once missing llvm-mc support is in place.
.if 0
.indirect_symbol sym_nlp_D
.long sym_nlp_D
.endif
.indirect_symbol sym_nlp_E
.long 0xAF
// FIXME: Enable this test once missing llvm-mc support is in place.
.if 0
sym_nlp_F = 10
.indirect_symbol sym_nlp_F
.long 0
.endif
.globl sym_nlp_G
sym_nlp_G:
.indirect_symbol sym_nlp_G
.long 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: 380
// CHECK: Flags
// CHECK: }
// CHECK: Sections
// CHECK: Relocations
// CHECK: Symbols
// CHECK: Indirect Symbols {
// CHECK: Number: 10
// CHECK: Symbols
// CHECK: }
// CHECK: Segment {
// CHECK: Cmd: LC_SEGMENT
// CHECK: Name:
// CHECK: Size: 260
// CHECK: vmaddr: 0x0
// CHECK: vmsize: 0x28
// CHECK: fileoff: 408
// CHECK: filesize: 40
// CHECK: maxprot: rwx
// CHECK: initprot: rwx
// CHECK: nsects: 3
// CHECK: flags: 0x0
// CHECK: }
// CHECK: Dysymtab {
// CHECK: ilocalsym: 0
// CHECK: nlocalsym: 2
// CHECK: iextdefsym: 2
// CHECK: nextdefsym: 2
// CHECK: iundefsym: 4
// CHECK: nundefsym: 6
// CHECK: tocoff: 0
// CHECK: ntoc: 0
// CHECK: modtaboff: 0
// CHECK: nmodtab: 0
// CHECK: extrefsymoff: 0
// CHECK: nextrefsyms: 0
// CHECK: indirectsymoff: 448
// CHECK: nindirectsyms: 10
// CHECK: extreloff: 0
// CHECK: nextrel: 0
// CHECK: locreloff: 0
// CHECK: nlocrel: 0
// CHECK: }