[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / retain-symbols-file.s
blob9cf9e6562fc6a36484791a82a93cd8b2c1878fdd
1 # REQUIRES: x86
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 {
14 # CHECK-NEXT: Name:
15 # CHECK-NEXT: Value:
16 # CHECK-NEXT: Size:
17 # CHECK-NEXT: Binding:
18 # CHECK-NEXT: Type:
19 # CHECK-NEXT: Other:
20 # CHECK-NEXT: Section:
21 # CHECK-NEXT: }
22 # CHECK-NEXT: Symbol {
23 # CHECK-NEXT: Name: und
24 # CHECK-NEXT: Value:
25 # CHECK-NEXT: Size:
26 # CHECK-NEXT: Binding: Global
27 # CHECK-NEXT: Type:
28 # CHECK-NEXT: Other:
29 # CHECK-NEXT: Section: Undefined
30 # CHECK-NEXT: }
31 # CHECK-NEXT: Symbol {
32 # CHECK-NEXT: Name: foo
33 # CHECK-NEXT: Value:
34 # CHECK-NEXT: Size:
35 # CHECK-NEXT: Binding: Global
36 # CHECK-NEXT: Type:
37 # CHECK-NEXT: Other:
38 # CHECK-NEXT: Section: .text
39 # CHECK-NEXT: }
40 # CHECK-NEXT: Symbol {
41 # CHECK-NEXT: Name: bar
42 # CHECK-NEXT: Value:
43 # CHECK-NEXT: Size:
44 # CHECK-NEXT: Binding: Global
45 # CHECK-NEXT: Type:
46 # CHECK-NEXT: Other:
47 # CHECK-NEXT: Section: .text
48 # CHECK-NEXT: }
49 # CHECK-NEXT: ]
51 .text
52 .globl _start
53 _start:
54 call zed@PLT
55 call und@PLT
57 .globl foo
58 .type foo,@function
59 foo:
60 retq
62 .globl bar
63 .type bar,@function
64 bar:
65 retq
67 .globl zed
68 .type zed,@function
69 zed:
70 retq
72 .type loc,@function
73 loc:
74 retq