Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / local-got-pie.s
blobb9c72076a15ce6fd9b46b4fc44f36d6242a66693
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
3 // RUN: ld.lld --hash-style=sysv %t.o -o %t -pie
4 // RUN: llvm-readobj -S -d -r %t | FileCheck %s
5 // RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck --check-prefix=DISASM %s
7 .globl _start
8 _start:
9 call foo@gotpcrel
11 .hidden foo
12 .global foo
13 foo:
14 nop
16 // DISASM: Disassembly of section .text:
17 // DISASM-EMPTY:
18 // DISASM-NEXT: <_start>:
19 // DISASM-NEXT: 1210: callq 0x22d8
20 // DISASM: <foo>:
21 // DISASM-NEXT: 1215: nop
23 // CHECK: Name: .got
24 // CHECK-NEXT: Type: SHT_PROGBITS
25 // CHECK-NEXT: Flags [
26 // CHECK-NEXT: SHF_ALLOC
27 // CHECK-NEXT: SHF_WRITE
28 // CHECK-NEXT: ]
29 // CHECK-NEXT: Address: 0x22D8
30 // CHECK-NEXT: Offset:
31 // CHECK-NEXT: Size: 8
33 // CHECK: 0x000000006FFFFFF9 RELACOUNT 1
35 // CHECK: Relocations [
36 // CHECK-NEXT: Section ({{.*}}) .rela.dyn {
37 // CHECK-NEXT: 0x22D8 R_X86_64_RELATIVE - 0x1215
38 // CHECK-NEXT: }
39 // CHECK-NEXT: ]