Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / relocatable-bss.s
blob89730a030261542181d9136c19e18b0238ea9a0f
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
3 # RUN: ld.lld -r %t1.o -o %t
4 # RUN: llvm-readobj --file-headers --sections -l --symbols -r %t | FileCheck %s
6 ## We check here that .bss does not occupy the space in file.
7 ## If it would, the SectionHeaderOffset would have offset about 5 megabytes.
8 # CHECK: ElfHeader {
9 # CHECK-NEXT: Ident {
10 # CHECK-NEXT: Magic: (7F 45 4C 46)
11 # CHECK-NEXT: Class: 64-bit
12 # CHECK-NEXT: DataEncoding: LittleEndian
13 # CHECK-NEXT: FileVersion: 1
14 # CHECK-NEXT: OS/ABI: SystemV
15 # CHECK-NEXT: ABIVersion: 0
16 # CHECK-NEXT: Unused: (00 00 00 00 00 00 00)
17 # CHECK-NEXT: }
18 # CHECK-NEXT: Type: Relocatable
19 # CHECK-NEXT: Machine: EM_X86_64
20 # CHECK-NEXT: Version:
21 # CHECK-NEXT: Entry:
22 # CHECK-NEXT: ProgramHeaderOffset:
23 # CHECK-NEXT: SectionHeaderOffset: 0xE8
24 # CHECK-NEXT: Flags [
25 # CHECK-NEXT: ]
26 # CHECK-NEXT: HeaderSize:
27 # CHECK-NEXT: ProgramHeaderEntrySize:
28 # CHECK-NEXT: ProgramHeaderCount:
29 # CHECK-NEXT: SectionHeaderEntrySize:
30 # CHECK-NEXT: SectionHeaderCount:
31 # CHECK-NEXT: StringTableSectionIndex:
32 # CHECK-NEXT: }
34 .text
35 .globl _start
36 _start:
37 nop
39 .bss
40 .space 5242880