Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / MachO / section-headers.s
blobc8a9689d350289dc9e0752e30e6fff6316598db8
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
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: ]
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: ]
26 # CHECK: Name: maxlen_16ch_name
27 # CHECK-NEXT: Segment: __TEXT
28 # CHECK-NEXT: Address:
29 # CHECK-NEXT: Size:
30 # CHECK-NEXT: Offset:
31 # CHECK-NEXT: Alignment: 3
32 # CHECK-NOT: }
33 # CHECK: Type: Regular (0x0)
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: 4096
43 .text
44 .align 1
45 .global _main
46 _main:
47 mov $0, %rax
48 ret
50 .section __TEXT,__cstring
51 .align 2
52 str:
53 .asciz "Hello world!\n"
55 .section __TEXT,maxlen_16ch_name
56 .align 3