Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / phdr-align.s
blob0748ae358095983d24df2c3bdad9d08e0cadc542
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "SECTIONS { \
5 # RUN: . = SIZEOF_HEADERS; \
6 # RUN: .bss : { *(.bss) } \
7 # RUN: .data : { *(.data) } \
8 # RUN: .text : { *(.text) } }" > %t.script
9 # RUN: ld.lld %t.o --script %t.script -o %t
10 # RUN: llvm-readobj --sections --symbols %t | FileCheck %s
12 # CHECK: Sections [
13 # CHECK-NEXT: Section {
14 # CHECK-NEXT: Index: 0
15 # CHECK-NEXT: Name: (0)
16 # CHECK-NEXT: Type: SHT_NULL
17 # CHECK-NEXT: Flags [
18 # CHECK-NEXT: ]
19 # CHECK-NEXT: Address: 0x0
20 # CHECK-NEXT: Offset: 0x0
21 # CHECK-NEXT: Size: 0
22 # CHECK-NEXT: Link: 0
23 # CHECK-NEXT: Info: 0
24 # CHECK-NEXT: AddressAlignment: 0
25 # CHECK-NEXT: EntrySize: 0
26 # CHECK-NEXT: }
27 # CHECK-NEXT: Section {
28 # CHECK-NEXT: Index: 1
29 # CHECK-NEXT: Name: .bss
30 # CHECK-NEXT: Type: SHT_NOBITS
31 # CHECK-NEXT: Flags [
32 # CHECK-NEXT: SHF_ALLOC
33 # CHECK-NEXT: SHF_WRITE
34 # CHECK-NEXT: ]
35 # CHECK-NEXT: Address: 0x158
36 # CHECK-NEXT: Offset: 0x158
37 # CHECK-NEXT: Size: 6
38 # CHECK-NEXT: Link: 0
39 # CHECK-NEXT: Info: 0
40 # CHECK-NEXT: AddressAlignment: 1
41 # CHECK-NEXT: EntrySize: 0
42 # CHECK-NEXT: }
43 # CHECK-NEXT: Section {
44 # CHECK-NEXT: Index: 2
45 # CHECK-NEXT: Name: .data
46 # CHECK-NEXT: Type: SHT_PROGBITS
47 # CHECK-NEXT: Flags [
48 # CHECK-NEXT: SHF_ALLOC
49 # CHECK-NEXT: SHF_WRITE
50 # CHECK-NEXT: ]
51 # CHECK-NEXT: Address: 0x15E
52 # CHECK-NEXT: Offset: 0x15E
53 # CHECK-NEXT: Size: 2
54 # CHECK-NEXT: Link: 0
55 # CHECK-NEXT: Info: 0
56 # CHECK-NEXT: AddressAlignment: 1
57 # CHECK-NEXT: EntrySize: 0
58 # CHECK-NEXT: }
59 # CHECK-NEXT: Section {
60 # CHECK-NEXT: Index: 3
61 # CHECK-NEXT: Name: .text
62 # CHECK-NEXT: Type: SHT_PROGBITS
63 # CHECK-NEXT: Flags [
64 # CHECK-NEXT: SHF_ALLOC
65 # CHECK-NEXT: SHF_EXECINSTR
66 # CHECK-NEXT: ]
67 # CHECK-NEXT: Address: 0x160
68 # CHECK-NEXT: Offset: 0x160
69 # CHECK-NEXT: Size: 1
70 # CHECK-NEXT: Link: 0
71 # CHECK-NEXT: Info: 0
72 # CHECK-NEXT: AddressAlignment: 4
73 # CHECK-NEXT: EntrySize: 0
74 # CHECK-NEXT: }
76 .global _start
77 .text
78 _start:
79 nop
80 .data
81 .word 1
82 .bss
83 .space 6