Skip to content

Commit 38666e6

Browse files
authored
[Test][JITLink] Correctly generate the R_X86_64_PC8 relocation. (#109283)
Previously, ELF_R_X86_64_PC8.s doesn't produce the R_X86_64_PC8 relocation. This patch helps fix it by emitting a byte `main - .` to the .rodata section.
1 parent 9614f69 commit 38666e6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

llvm/test/ExecutionEngine/JITLink/x86-64/ELF_R_X86_64_PC8.s

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,5 @@ main:
1212
retq
1313
.size main, .-main
1414

15-
.type P,@object
16-
.globl P
17-
P:
18-
.byte main-. # Generate R_X86_64_PC8 relocation.
19-
.size P, .-P
15+
.rodata
16+
.byte main-. # Generate R_X86_64_PC8 relocation.

0 commit comments

Comments
 (0)