2 /// Test that addresses of existing secure gateway veneers are output in the CMSE import library.
3 /// Test that
.gnu.sgstubs is size 0 when no linker synthesized secure gateway veneers are created.
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 --out-implib=%t.lib
7 // RUN
: llvm-objdump
-d
--no-show-raw-insn
%t | FileCheck
%s
8 // RUN
: llvm-readelf
-S
%t | FileCheck
%s
--check-prefixes
=SGSTUBSSIZE
9 // RUN
: llvm-readelf
-s
%t.lib | FileCheck
%s
--check-prefixes
=IMPLIBSYMS
11 // CHECK
: Disassembly of section
.text:
13 // CHECK-LABEL
: <existing_veneer
>:
14 // CHECK-NEXT
: 8000: sg
15 // CHECK-NEXT
: 8004: nop
17 // CHECK-LABEL
: <__acle_se_existing_veneer
>:
18 // CHECK-NEXT
: 8006: nop
20 .include "arm-cmse-macros.s"
22 cmse_no_veneer existing_veneer
, function
, global
, function
, global
24 /// Name Type Address Off Size ES Flg Lk Inf Al
25 // SGSTUBSSIZE
: .gnu.sgstubs PROGBITS 00020000 020000 000000 08 AX 0 0 32
27 // IMPLIBSYMS
: Symbol table
'.symtab' contains
2 entries
:
28 // IMPLIBSYMS-NEXT
: Num
: Value Size Type Bind Vis Ndx Name
29 // IMPLIBSYMS-NEXT
: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
30 // IMPLIBSYMS-NEXT
: 1: 00008001 8 FUNC GLOBAL DEFAULT
ABS existing_veneer