1// This tests checks the minimum alignment of the AARch64 function 2// is equal to 4. Otherwise the jitlinker would fail to link the 3// binary since the size of the first function after reorder is not 4// not a multiple of 4. 5 6# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o 7# RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -nostdlib -Wl,-q 8# RUN: link_fdata %s %t.o %t.fdata 9# RUN: llvm-bolt %t.exe -o %t.bolt --use-old-text=0 --lite=0 \ 10# RUN: --align-functions-max-bytes=1 \ 11# RUN: --data %t.fdata --reorder-functions=exec-count 12# RUN: llvm-nm -n %t.bolt | FileCheck %s 13 14# CHECK: {{0|4|8|c}} T dummy 15# CHECK-NEXT: {{0|4|8|c}} T _start 16 17 .text 18 .align 4 19 .global _start 20 .type _start, %function 21_start: 22# FDATA: 0 [unknown] 0 1 _start 0 0 1 23 bl dymmy 24 ret 25 .size _start, .-_start 26 27 .global dummy 28 .type dummy, %function 29dummy: 30# FDATA: 0 [unknown] 0 1 dummy 0 0 42 31 adr x0, .Lci 32 ret 33.Lci: 34 .byte 0 35 .size dummy, .-dummy 36