File tree Expand file tree Collapse file tree 3 files changed +34
-53
lines changed Expand file tree Collapse file tree 3 files changed +34
-53
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # REQUIRES: x86
2
+ # RUN: rm -rf %t && split-file %s %t && cd %t
3
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 -x86-relax-relocations=false a.s -o a.o
4
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 %S/Inputs/shared.s -o s.o
5
+ # RUN: ld.lld -shared s.o -o s.so
6
+
7
+ # RUN: ld.lld a.o -o a
8
+ # RUN: llvm-readelf -r a | FileCheck %s --check-prefix=NORELOC
9
+ # RUN: ld.lld a.o s.so -o as
10
+ # RUN: llvm-objdump -dR as | FileCheck %s
11
+
12
+ # RUN: ld.lld -pie a.o s.so -o as.pie
13
+ # RUN: llvm-objdump -dR as.pie | FileCheck %s
14
+
15
+ # RUN: ld.lld -shared a.o -o a.so
16
+ # RUN: llvm-objdump -dR a.so | FileCheck %s
17
+
18
+ # NORELOC: no relocation
19
+
20
+ # CHECK: TYPE VALUE
21
+ # CHECK-NEXT: R_X86_64_GLOB_DAT foo{{$}}
22
+ # CHECK-NEXT: R_X86_64_JUMP_SLOT foo{{$}}
23
+ # CHECK-EMPTY:
24
+ # CHECK: <_start>:
25
+ # CHECK-NEXT: movq {{.*}}(%rip), %rax
26
+ # CHECK-NEXT: callq {{.*}} <foo@plt>
27
+
28
+ #--- a.s
29
+ .weak foo
30
+
31
+ .globl _start
32
+ _start:
33
+ mov foo@gotpcrel(%rip ), %rax
34
+ call foo
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments