[clang-tidy][modernize-use-starts-ends-with] Fix operator rewriting false negative...
[llvm-project.git] / lld / test / ELF / arm-cmse-veneers.s
blob7b5b293081140ebe299511a5a645c5089b450754
1 // REQUIRES: arm
2 /// Test that symbol visibilities of <sym, __acle_se_sym> pairs in the objects
3 /// are preserved in the executable.
5 // RUN: llvm-mc -arm-add-build-attributes -filetype=obj --triple=thumbv8m.main %s -I %S/Inputs -o %t.o
6 // RUN: ld.lld --cmse-implib -Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 %t.o -o %t
7 // RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s
8 // RUN: llvm-readelf -s %t | FileCheck %s --check-prefixes=SYM
10 // CHECK: Disassembly of section .gnu.sgstubs:
12 // CHECK-LABEL: <global_foo>:
13 // CHECK-NEXT: 20000: sg
14 // CHECK-NEXT: b.w {{.*}} <__acle_se_global_foo>
15 // CHECK-EMPTY:
16 // CHECK-LABEL: <weak_bar>:
17 // CHECK-NEXT: 20008: sg
18 // CHECK-NEXT: b.w {{.*}} <__acle_se_weak_bar>
19 // CHECK-EMPTY:
20 // CHECK-LABEL: <global_baz>:
21 // CHECK-NEXT: 20010: sg
22 // CHECK-NEXT: b.w {{.*}} <__acle_se_global_baz>
23 // CHECK-EMPTY:
24 // CHECK-LABEL: <weak_qux>:
25 // CHECK-NEXT: 20018: sg
26 // CHECK-NEXT: b.w {{.*}} <__acle_se_weak_qux>
28 // SYM: 00020001 {{.*}} GLOBAL {{.*}} global_foo
29 // SYM: 00008001 {{.*}} GLOBAL {{.*}} __acle_se_global_foo
30 // SYM: 00020009 {{.*}} WEAK {{.*}} weak_bar
31 // SYM: 00008005 {{.*}} WEAK {{.*}} __acle_se_weak_bar
32 // SYM: 00020011 {{.*}} GLOBAL {{.*}} global_baz
33 // SYM: 00008009 {{.*}} WEAK {{.*}} __acle_se_global_baz
34 // SYM: 00020019 {{.*}} WEAK {{.*}} weak_qux
35 // SYM: 0000800d {{.*}} GLOBAL {{.*}} __acle_se_weak_qux
37 .include "arm-cmse-macros.s"
39 cmse_veneer global_foo, function, global, function, global
40 cmse_veneer weak_bar, function, weak, function, weak
41 cmse_veneer global_baz, function, global, function, weak
42 cmse_veneer weak_qux, function, weak, function, global