[ELF] Make SyntheticSection parameter order match InputSection
[llvm-project.git] / lld / test / ELF / version-exclude-libs.s
blob0282e5d4eff097aabb09ae1f9348b7a6b50d3395
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
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.
14 // CHECK: Name: func
15 // CHECK-NEXT: Value:
16 // CHECK-NEXT: Size:
17 // CHECK-NEXT: Binding: Local (0x0)
19 // CHECK-DYN-NOT: func
21 // CHECK-ERR: symbol func@@VER2 has undefined version VER2
22 // CHECK-ERR-NEXT: symbol func@VER has undefined version VER
24 .text
25 .globl _start
26 .globl func
27 _start:
28 ret
30 .data
31 .quad func