1// REQUIRES: x86 2// RUN: llvm-mc %p/Inputs/versiondef.s -o %t.o -filetype=obj -triple=x86_64-pc-linux 3// RUN: rm -f %t.a 4// RUN: llvm-ar -r %t.a %t.o 5// RUN: llvm-mc %s -o %t2.o -filetype=obj -triple=x86_64-pc-linux 6// RUN: ld.lld %t2.o %t.a --shared --exclude-libs ALL -o %t.so 7// RUN: llvm-readobj --symbols %t.so | FileCheck %s 8// RUN: llvm-readobj --dyn-syms %t.so | FileCheck -check-prefix CHECK-DYN %s 9// RUN: not ld.lld %t2.o %t.a --shared -o /dev/null 2>&1 | FileCheck -check-prefix=CHECK-ERR %s 10 11// Test that we do not give an error message for undefined versions when the 12// symbol is not exported to the dynamic symbol table. 13 14// CHECK: Name: func 15// CHECK-NEXT: Value: 16// CHECK-NEXT: Size: 17// CHECK-NEXT: Binding: Local (0x0) 18 19// CHECK-DYN-NOT: func 20 21// CHECK-ERR: symbol func@@VER2 has undefined version VER2 22// CHECK-ERR-NEXT: symbol func@VER has undefined version VER 23 24 .text 25 .globl _start 26 .globl func 27_start: 28 ret 29 30 .data 31 .quad func 32