Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / global-offset-table-position-i386.s
blobea519b7d8e347c45e521fb843c6f2cfd8b5c9277
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=i386-pc-linux %s -o %t
3 // RUN: ld.lld --hash-style=sysv -shared %t -o %t2
4 // RUN: llvm-readobj --symbols %t2 | FileCheck %s
6 // The X86 _GLOBAL_OFFSET_TABLE_ is defined at the start of the .got.plt
7 // section.
8 .globl a
9 .type a,@object
10 .comm a,4,4
12 .globl f
13 .type f,@function
15 addl $_GLOBAL_OFFSET_TABLE_, %eax
16 movl a@GOT(%eax), %eax
18 .global _start
19 .type _start,@function
20 _start:
21 addl $_GLOBAL_OFFSET_TABLE_, %eax
22 calll f@PLT
24 // CHECK: Name: _GLOBAL_OFFSET_TABLE_
25 // CHECK-NEXT: Value:
26 // CHECK-NEXT: Size: 0
27 // CHECK-NEXT: Binding: Local (0x0)
28 // CHECK-NEXT: Type: None (0x0)
29 // CHECK-NEXT: Other [ (0x2)
30 // CHECK-NEXT: STV_HIDDEN (0x2)
31 // CHECK-NEXT: ]
32 // CHECK-NEXT: Section: .got.plt