Skip to content

Commit 258e04f

Browse files
committed
[JITLink][ELF][x86-64] Replace R_X86_64_32 yaml testcase with asm version.
The assembly version of this testcase is shorter and easier to read.
1 parent ad7ab8f commit 258e04f

File tree

2 files changed

+31
-83
lines changed

2 files changed

+31
-83
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \
2+
# RUN: -filetype=obj -o %t.o %s
3+
# RUN: llvm-jitlink -noexec -abs X=0x12345678 -check=%s %t.o
4+
# RUN: not llvm-jitlink -noexec -abs X=0x123456789 %t.o 2>&1 | \
5+
# RUN: FileCheck -check-prefix=CHECK-ERROR %s
6+
#
7+
# Check success and failure cases of R_X86_64_32 handling.
8+
9+
# jitlink-check: *{8}P = X
10+
11+
# CHECK-ERROR: relocation target "X" {{.*}} is out of range of Pointer32 fixup
12+
13+
.text
14+
.section .text.main,"ax",@progbits
15+
.globl main
16+
.p2align 4, 0x90
17+
.type main,@function
18+
main:
19+
xorl %eax, %eax
20+
retq
21+
.Lfunc_end0:
22+
.size main, .Lfunc_end0-main
23+
24+
.type P,@object
25+
.data
26+
.globl P
27+
.p2align 2, 0x0
28+
P:
29+
.long X # Using long here generates R_X86_64_32.
30+
.long 0
31+
.size P, 8

llvm/test/ExecutionEngine/JITLink/x86-64/ELF_R_X86_64_32.yaml

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)