[PATCH] D157519: [JITLink][AArch32] Tests for ELF::R_ARM_ABS32 and ELF::R_ARM_REL32
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 03:35:01 PST 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e46bc73a4a4: [JITLink][AArch32] Tests for ELF::R_ARM_ABS32 and ELF::R_ARM_REL32 (authored by Eymay, committed by sgraenitz).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157519/new/
https://reviews.llvm.org/D157519
Files:
llvm/test/ExecutionEngine/JITLink/AArch32/ELF_static_data_reloc.s
Index: llvm/test/ExecutionEngine/JITLink/AArch32/ELF_static_data_reloc.s
===================================================================
--- /dev/null
+++ llvm/test/ExecutionEngine/JITLink/AArch32/ELF_static_data_reloc.s
@@ -0,0 +1,37 @@
+# RUN: llvm-mc -triple=armv7-none-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t_armv7.o %s
+# RUN: llvm-objdump -r %t_armv7.o | FileCheck --check-prefix=CHECK-TYPE %s
+# RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb -slab-page-size 4096 \
+# RUN: -abs target=0x76bbe88f -check %s %t_armv7.o
+
+# RUN: llvm-mc -triple=thumbv7-none-linux-gnueabi -arm-add-build-attributes -filetype=obj -o %t_thumbv7.o %s
+# RUN: llvm-objdump -r %t_thumbv7.o | FileCheck --check-prefix=CHECK-TYPE %s
+# RUN: llvm-jitlink -noexec -slab-address 0x76ff0000 -slab-allocate 10Kb -slab-page-size 4096 \
+# RUN: -abs target=0x76bbe88f -check %s %t_thumbv7.o
+
+ .data
+ .global target
+
+ .text
+ .syntax unified
+
+# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_ABS32 target
+# jitlink-check: *{4}(abs32) = target
+ .global abs32
+abs32:
+ .word target
+ .size abs32, .-abs32
+
+# CHECK-TYPE: {{[0-9a-f]+}} R_ARM_REL32 target
+# jitlink-check: (rel32 + *{4}(rel32))[31:0] = target
+ .global rel32
+rel32:
+ .word target - .
+ .size rel32, .-rel32
+
+# Empty main function for jitlink to be happy
+ .globl main
+ .type main, %function
+ .p2align 2
+main:
+ bx lr
+ .size main, .-main
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157519.558034.patch
Type: text/x-patch
Size: 1457 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20231107/7a353a0e/attachment.bin>
More information about the llvm-commits
mailing list