1 // This test checks that the veneer are properly handled by BOLT.
2 // Strip
.rela.mytext section to simulate inserted by a linker veneers
3 // that does
not contain relocations.
5 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
7 # RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -nostdlib \
8 # RUN: -fuse-ld=lld -Wl,--no-relax -Wl,-q
9 # RUN: llvm-objdump -d --disassemble-symbols='myveneer' %t.exe | \
10 # RUN: FileCheck --check-prefix=CHECKVENEER %s
11 # RUN: llvm-objcopy --remove-section .rela.mytext %t.exe
12 # RUN: llvm-bolt %t.exe -o %t.bolt --elim-link-veneers=true --lite=0
13 # RUN: llvm-objdump -d -j .text --disassemble-symbols='myveneer' %t.bolt | \
14 # RUN: FileCheck --check-prefix=CHECKOUTVENEER %s
15 # RUN: llvm-objdump -d --disassemble-symbols='_start' %t.bolt | FileCheck %s
26 .section ".mytext", "ax"
28 # CHECKOUTVENEER-NOT: {{.*}} <myveneer>:
30 .type myveneer, %function
33 # CHECKVENEER-NEXT: add
35 add x16
, x16
, #:lo12:foo
38 .size myveneer, .-myveneer
41 .type _start, %function
43 # CHECK: {{.*}} bl {{.*}} <foo>
46 .size _start, .-_start