[llvm] [BOLT][AArch64] Check Last Element Instead of Returning `nullptr` in `lookupStubFromGroup` (PR #114015)
Paschalis Mpeis via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 12 03:39:00 PST 2024
================
@@ -0,0 +1,28 @@
+# REQUIRES: system-linux, asserts
+# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o
+# RUN: %clang %cflags -O0 -fPIC -pie %t.o -o %t.exe -nostdlib -Wl,-q
+# RUN: link_fdata %s %t.o %t.fdata
+# RUN: llvm-bolt %t.exe -o %t.bolt \
+# RUN: --data %t.fdata | FileCheck %s
+# CHECK: BOLT-INFO: Inserted 1 stubs in the hot area and 0 stubs in the cold area.
+
+.section .text
+.global _start
+.global func
+
+ .align 4
+ .global _start
+ .type _start, %function
+_start:
+# FDATA: 0 [unknown] 0 1 _start 0 0 100
+ bl func
+ bl func
+ ret
+ .space 0x8000000
+ .global func
+ .type func, %function
+func:
+ add x0, x0, #1
+ ret
+
+.reloc 0, R_AARCH64_NONE
----------------
paschalis-mpeis wrote:
nit: can you add a new line here?
https://github.com/llvm/llvm-project/pull/114015
More information about the llvm-commits
mailing list