@ RUN: llvm-mc -n -triple thumbv7-apple-darwin10 %s -filetype=obj -o %t.obj
@ RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols - < %t.obj > %t.dump
@ RUN: FileCheck < %t.dump %s
.syntax unified
.section __TEXT,__text,regular,pure_instructions
.globl _main
.align 2
.code 16
.thumb_func _main
_main:
LPC0_0:
blx _printf
.align 2
LCPI0_0:
.long L_.str-(LPC0_0+4)
.section __TEXT,__cstring,cstring_literals
.align 2
L_.str:
.asciz "s0"
.subsections_via_symbols
@ CHECK: File: <stdin>
@ CHECK: Format: Mach-O arm
@ CHECK: Arch: arm
@ CHECK: AddressSize: 32bit
@ CHECK: MachHeader {
@ CHECK: Magic:
@ CHECK: CpuType:
@ CHECK: CpuSubType:
@ CHECK: FileType:
@ CHECK: NumOfLoadCommands: 4
@ CHECK: SizeOfLoadCommands: 312
@ CHECK: Flags
@ CHECK: }
@ CHECK: Sections
@ CHECK: Relocations
@ CHECK: Symbols
@ CHECK: Indirect Symbols {
@ CHECK: Number: 0
@ CHECK: Symbols
@ CHECK: }
@ CHECK: Segment {
@ CHECK: Cmd: LC_SEGMENT
@ CHECK: Name:
@ CHECK: Size: 192
@ CHECK: vmaddr: 0x0
@ CHECK: vmsize: 0xB
@ CHECK: fileoff: 340
@ CHECK: filesize: 11
@ CHECK: maxprot: rwx
@ CHECK: initprot: rwx
@ CHECK: nsects: 2
@ CHECK: flags: 0x0
@ CHECK: }
@ CHECK: Dysymtab {
@ CHECK: ilocalsym: 0
@ CHECK: nlocalsym: 0
@ CHECK: iextdefsym: 0
@ CHECK: nextdefsym: 1
@ CHECK: iundefsym: 1
@ CHECK: nundefsym: 1
@ 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: }