[llvm] [BOLT] Fix long jump negative offset issue. (PR #67132)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 24 18:41:18 PDT 2023
================
@@ -0,0 +1,111 @@
+# This test checks long call negative offset boundary(0x8000000) for aarch64.
+
+# REQUIRES: system-linux
+
+# RUN: %clang %s -o %t.exe -nostartfiles -fuse-ld=lld -Wl,-z,now,-q \
+# RUN: -Wl,--script=%p/Inputs/long-jmp-offset-boundary.ld
+# RUN: llvm-bolt %t.exe -o %t.bolt.exe -skip-funcs="foo.*"
+# RUN: llvm-objdump -d %t.bolt.exe | FileCheck %s
+# CHECK: 0000000000000100 <foo>:
+# CHECK: 8000100: {{.*}} bl 0x100 <foo>
+
+ .text
+ .section foo_section,"ax", at progbits
+ .globl foo
+ .p2align 2
+ .type foo, at function
+foo:
+ .cfi_startproc
+// %bb.0:
+ ret
+.Lfunc_end0:
+ .size foo, .Lfunc_end0-foo
+ .cfi_endproc
+
+ .section main_section,"ax", at progbits
+ .globl main // -- Begin function main
+ .p2align 2
+ .type main, at function
+main:
+ .cfi_startproc
+// %bb.0:
+ mov w8, #100
----------------
qijitao wrote:
Yes, I just need the bl foo instruction. I'll find a way to delete the other instructions.
https://github.com/llvm/llvm-project/pull/67132
More information about the llvm-commits
mailing list