[llvm] [BOLT] Fix long jump negative offset issue. (PR #67132)

Vladislav Khmelevsky via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 06:39:36 PDT 2023


================
@@ -0,0 +1,30 @@
+# This test checks long call negative offset boundary(0x8000000) for aarch64.
+
+# REQUIRES: system-linux
+
+# RUN: %clang %cflags %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 --print-imm-hex %t.bolt.exe | FileCheck %s
+
+# The default alignment of the new program header table and the new text is
+# HugePageSize(2MB). Check the second bl <foo> instruction.
+# CHECK: {{.*}}bl{{.*}}<foo>
----------------
yota9 wrote:

Please use -j .text objdump option to skip old bl instruction so you won't have to skip the first one here

https://github.com/llvm/llvm-project/pull/67132


More information about the llvm-commits mailing list