1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %s -o %t.o 3# RUN: %lld -o %t %t.o 4# RUN: llvm-readobj --section-headers --macho-segment %t | FileCheck %s 5 6# CHECK: Name: __text 7# CHECK-NEXT: Segment: __TEXT 8# CHECK-NOT: } 9# CHECK: Alignment: 1 10# CHECK-NOT: } 11# CHECK: Type: Regular (0x0) 12# CHECK-NEXT: Attributes [ (0x800004) 13# CHECK-NEXT: PureInstructions (0x800000) 14# CHECK-NEXT: SomeInstructions (0x4) 15# CHECK-NEXT: ] 16 17# CHECK: Name: __cstring 18# CHECK-NEXT: Segment: __TEXT 19# CHECK-NOT: } 20# CHECK: Alignment: 2 21# CHECK-NOT: } 22# CHECK: Type: CStringLiterals (0x2) 23# CHECK-NEXT: Attributes [ (0x0) 24# CHECK-NEXT: ] 25 26# CHECK: Name: maxlen_16ch_name 27# CHECK-NEXT: Segment: __TEXT 28# CHECK-NEXT: Address: 29# CHECK-NEXT: Size: [[#%x, LAST_SEC_SIZE:]] 30# CHECK-NEXT: Offset: [[#%u, LAST_SEC_OFF:]] 31# CHECK-NEXT: Alignment: 3 32# CHECK-NOT: } 33# CHECK: Type: Regular (0x0) 34 35# CHECK-LABEL: Segment { 36# CHECK: Name: __TEXT 37# CHECK-NEXT: Size: 38# CHECK-NEXT: vmaddr: 39# CHECK-NEXT: vmsize: 40# CHECK-NEXT: fileoff: 0 41# CHECK-NEXT: filesize: [[#%u, LAST_SEC_SIZE + LAST_SEC_OFF]] 42 43.text 44.align 1 45.global _main 46_main: 47 mov $0, %rax 48 ret 49 50.section __TEXT,__cstring 51.align 2 52str: 53 .asciz "Hello world!\n" 54 55.section __TEXT,maxlen_16ch_name 56.align 3 57