2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
3 # RUN: echo "bar" > %t_retain.txt
4 # RUN: echo "foo" >> %t_retain.txt
5 # RUN: ld.lld --hash-style=sysv -shared --retain-symbols-file=%t_retain.txt %t -o %t2
6 # RUN: llvm-readobj --dyn-symbols %t2 | FileCheck %s
8 ## Check separate form.
9 # RUN: ld.lld --hash-style=sysv -shared --retain-symbols-file %t_retain.txt %t -o %t2
10 # RUN: llvm-readobj --dyn-symbols %t2 | FileCheck %s
12 # CHECK: DynamicSymbols [
13 # CHECK-NEXT: Symbol {
17 # CHECK-NEXT: Binding:
20 # CHECK-NEXT: Section:
22 # CHECK-NEXT: Symbol {
23 # CHECK-NEXT: Name: und
26 # CHECK-NEXT: Binding: Global
29 # CHECK-NEXT: Section: Undefined
31 # CHECK-NEXT: Symbol {
32 # CHECK-NEXT: Name: foo
35 # CHECK-NEXT: Binding: Global
38 # CHECK-NEXT: Section: .text
40 # CHECK-NEXT: Symbol {
41 # CHECK-NEXT: Name: bar
44 # CHECK-NEXT: Binding: Global
47 # CHECK-NEXT: Section: .text