Skip to content

Commit bc5b9b4

Browse files
committed
[Test][JitLink] Correctly generate the R_X86_64_PC8 relocation.
Previously, ELF_R_X86_64_PC8.s doesn't produce the R_X86_64_PC8 relocation. This patch helps fix it. Before: ``` llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj -o - ELF_R_X86_64_PC8.s | llvm-readobj -r - File: <stdin> Format: elf64-x86-64 Arch: x86_64 AddressSize: 64bit LoadName: <Not found> Relocations [ ] ``` After: ``` llvm-mc -triple=x86_64-unknown-linux -position-independent -filetype=obj -o - ELF_R_X86_64_PC8.s | llvm-readobj -r - File: <stdin> Format: elf64-x86-64 Arch: x86_64 AddressSize: 64bit LoadName: <Not found> Relocations [ Section (3) .rela.text { 0x4 R_X86_64_PC8 main 0xFFFFFFFFFFFFFFFF } ] ```
1 parent f1ff3a2 commit bc5b9b4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,4 @@
1010
main:
1111
xorl %eax, %eax
1212
retq
13-
.size main, .-main
14-
15-
.type P,@object
16-
.globl P
17-
P:
18-
.byte main-. # Generate R_X86_64_PC8 relocation.
19-
.size P, .-P
13+
loope main # Generate R_X86_64_PC8 relocation.

0 commit comments

Comments
 (0)