summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/i386-gotpc-dynamic.s
blob: 2292823e77c5efde7449fcb7ccbc82e3260b7c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=i686-pc-linux %s -o %t.o
# RUN: ld.lld --hash-style=sysv %t.o -o %t.so -shared
# RUN: llvm-readelf -S %t.so | FileCheck %s
# RUN: llvm-objdump -d %t.so | FileCheck --check-prefix=DISASM %s

# CHECK: .got.plt          PROGBITS        00003190

## 0x3190 - 0x1158 = 8248
# DISASM: 1158: {{.*}} movl $8248, %eax

.section .foo,"ax",@progbits
foo:
 movl $bar@got-., %eax # R_386_GOTPC

.local bar
bar:
OpenPOWER on IntegriCloud