1 // This test checks that the gold linker style veneer are properly handled
3 // Strip
.rela.mytext section to simulate inserted by a linker veneers
4 // that does
not contain relocations.
6 # RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
8 # RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -nostdlib \
9 # RUN: -fuse-ld=lld -Wl,--no-relax -Wl,-q
10 # RUN: llvm-objcopy --remove-section .rela.mytext %t.exe
11 # RUN: llvm-objdump -d -j .mytext %t.exe | \
12 # RUN: FileCheck --check-prefix=CHECKVENEER %s
13 # RUN: llvm-bolt %t.exe -o %t.bolt --elim-link-veneers=true \
14 # RUN: --lite=0 --use-old-text=0
15 # RUN: llvm-objdump -d -j .text %t.bolt | FileCheck %s
20 .type dummy, %function
26 .section ".mytext", "ax"
32 # CHECK-NEXT : {{.*}} bl {{.*}} <foo2>
41 # CHECK-NEXT : {{.*}} bl {{.*}} <foo2>
47 .type _start, %function
50 # CHECK-NEXT: {{.*}} bl {{.*}} <foo>
56 .size _start, .-_start
59 # CHECKVENEER-NEXT: add
60 # CHECKVENEER-NEXT: br
61 # CHECKVENEER-NEXT: nop
63 add x16
, x16
, #:lo12:foo
67 # CHECKVENEER-NEXT: adrp
68 # CHECKVENEER-NEXT: add
69 # CHECKVENEER-NEXT: br
70 # CHECKVENEER-NEXT: nop
72 add x16
, x16
, #:lo12:foo2