blob: a25a08f14b6fcc413137614d5c053d46906340d2 [file] [log] [blame]
Peter Smith796fb992018-05-14 10:13:56 +00001// REQUIRES: x86
2// RUN: llvm-mc %p/Inputs/versiondef.s -o %t.o -filetype=obj -triple=x86_64-pc-linux
Chris Jackson1a721eb2018-08-02 11:33:54 +00003// RUN: rm -f %t.a
Peter Smith796fb992018-05-14 10:13:56 +00004// 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-symbols %t.so | FileCheck -check-prefix CHECK-DYN %s
9// RUN: not ld.lld %t2.o %t.a --shared -o %t.so 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