3 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "{ foo; zed; };" > %t.list
5 # RUN: echo "{ global: foo; bar; local: *; };" > %t.vers
6 # RUN: ld.lld --hash-style=sysv -fatal-warnings -dynamic-list %t.list -version-script %t.vers -shared %t.o -o %t.so
7 # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOCS %s
8 # RUN: llvm-readobj --dyn-syms %t.so | FileCheck --check-prefix=DYNSYMS %s
10 # RUN: echo "V1 { global: foo; bar; local: *; };" > %t.vers
11 # RUN: ld.lld --hash-style=sysv -fatal-warnings -dynamic-list %t.list -version-script %t.vers -shared %t.o -o %t.so
12 # RUN: llvm-readobj -r %t.so | FileCheck --check-prefix=RELOCS %s
13 # RUN: llvm-readobj --dyn-syms %t.so | FileCheck --check-prefix=DYNSYMS %s
15 # RELOCS: Relocations [
16 # RELOCS-NEXT: Section ({{.*}}) .rela.plt {
17 # RELOCS-NEXT: R_X86_64_JUMP_SLOT foo{{.*}} 0x0
18 # RELOCS-NEXT: R_X86_64_JUMP_SLOT ext 0x0
22 # DYNSYMS: DynamicSymbols [
23 # DYNSYMS-NEXT: Symbol {
25 # DYNSYMS-NEXT: Value: 0x0
26 # DYNSYMS-NEXT: Size: 0
27 # DYNSYMS-NEXT: Binding: Local
28 # DYNSYMS-NEXT: Type: None
29 # DYNSYMS-NEXT: Other: 0
30 # DYNSYMS-NEXT: Section: Undefined
32 # DYNSYMS-NEXT: Symbol {
33 # DYNSYMS-NEXT: Name: foo
34 # DYNSYMS-NEXT: Value:
36 # DYNSYMS-NEXT: Binding: Global
38 # DYNSYMS-NEXT: Other:
39 # DYNSYMS-NEXT: Section:
41 # DYNSYMS-NEXT: Symbol {
42 # DYNSYMS-NEXT: Name: bar
43 # DYNSYMS-NEXT: Value:
45 # DYNSYMS-NEXT: Binding: Global
47 # DYNSYMS-NEXT: Other:
48 # DYNSYMS-NEXT: Section:
50 # DYNSYMS-NEXT: Symbol {
51 # DYNSYMS-NEXT: Name: ext
52 # DYNSYMS-NEXT: Value:
54 # DYNSYMS-NEXT: Binding: Global
56 # DYNSYMS-NEXT: Other:
57 # DYNSYMS-NEXT: Section: