31 lines · plain
1// REQUIRES: arm2/// 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.4 5// RUN: llvm-mc -arm-add-build-attributes -filetype=obj --triple=thumbv8m.main %s -I %S/Inputs -o %t.o6// RUN: ld.lld --cmse-implib --image-base=0x8000 -Ttext=0x8000 --section-start .gnu.sgstubs=0x20000 %t.o -o %t --out-implib=%t.lib7// RUN: llvm-objdump -d --no-show-raw-insn %t | FileCheck %s8// RUN: llvm-readelf -S %t | FileCheck %s --check-prefixes=SGSTUBSSIZE9// RUN: llvm-readelf -s %t.lib | FileCheck %s --check-prefixes=IMPLIBSYMS10 11// CHECK: Disassembly of section .text:12 13// CHECK-LABEL: <existing_veneer>:14// CHECK-NEXT: 8000: sg15// CHECK-NEXT: 8004: nop16 17// CHECK-LABEL: <__acle_se_existing_veneer>:18// CHECK-NEXT: 8006: nop19 20 .include "arm-cmse-macros.s"21 22 cmse_no_veneer existing_veneer, function, global, function, global23 24/// Name Type Address Off Size ES Flg Lk Inf Al25// SGSTUBSSIZE: .gnu.sgstubs PROGBITS 00020000 020000 000000 08 AX 0 0 3226 27// IMPLIBSYMS: Symbol table '.symtab' contains 2 entries:28// IMPLIBSYMS-NEXT: Num: Value Size Type Bind Vis Ndx Name29// IMPLIBSYMS-NEXT: 0: 00000000 0 NOTYPE LOCAL DEFAULT UND30// IMPLIBSYMS-NEXT: 1: 00008001 8 FUNC GLOBAL DEFAULT ABS existing_veneer31