[PATCH] D126659: [JITLink][ELF/AARCH64][NFC] Add a testcase for R_AARCH64_ABS64
Sunho Kim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 08:30:33 PDT 2022
sunho created this revision.
Herald added a subscriber: kristof.beyls.
Herald added a project: All.
sunho requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Add jitlink-check test cases for R_AARCH64_ABS64 relocation type.
https://reviews.llvm.org/D126659
Files:
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s
Index: llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s
===================================================================
--- llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s
+++ llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s
@@ -1,6 +1,7 @@
# RUN: rm -rf %t && mkdir -p %t
# RUN: llvm-mc -triple=aarch64-unknown-linux-gnu -relax-relocations=false -position-independent -filetype=obj -o %t/elf_reloc.o %s
-# RUN: llvm-jitlink -noexec -check %s %t/elf_reloc.o
+# RUN: llvm-jitlink -noexec \
+# RUN: -check %s %t/elf_reloc.o
.text
@@ -110,6 +111,15 @@
str x0, [x1, :lo12:named_data]
.size test_str_64bit, .-test_str_64bit
+# Check R_AARCH64_ABS64 relocation of a function pointer to local symbol
+#
+# jitlink-check: *{8}local_func_addr_quad = named_func
+ .globl local_func_addr_quad
+ .p2align 4
+local_func_addr_quad:
+ .xword named_func
+ .size local_func_addr_quad, 8
+
.globl named_data
.p2align 4
.type named_data, at object
@@ -117,3 +127,9 @@
.quad 0x2222222222222222
.quad 0x3333333333333333
.size named_data, .-named_data
+
+ .globl named_func
+ .type named_func, at function
+named_func:
+ ret
+ .size named_func, .-named_func
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126659.432933.patch
Type: text/x-patch
Size: 1351 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220530/dbda026d/attachment.bin>
More information about the llvm-commits
mailing list