symbols.test
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
## This is the test for the --symbols option and its aliases.
# RUN: llvm-readobj --symbols %p/Inputs/trivial.obj.wasm | FileCheck %s
# CHECK: Symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: main
# CHECK-NEXT: Type: FUNCTION (0x0)
# CHECK-NEXT: Flags [ (0x0)
# CHECK-NEXT: ]
# CHECK-NEXT: ElementIndex: 0x2
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: .L.str
# CHECK-NEXT: Type: DATA (0x1)
# CHECK-NEXT: Flags [ (0x2)
# CHECK-NEXT: BINDING_LOCAL (0x2)
# CHECK-NEXT: ]
# CHECK-NEXT: Offset: 0x0
# CHECK-NEXT: Segment: 0x0
# CHECK-NEXT: Size: 0xD
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: puts
# CHECK-NEXT: Type: FUNCTION (0x0)
# CHECK-NEXT: Flags [ (0x10)
# CHECK-NEXT: UNDEFINED (0x10)
# CHECK-NEXT: ]
# CHECK-NEXT: ImportName: puts
# CHECK-NEXT: ImportModule: env
# CHECK-NEXT: ElementIndex: 0x0
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: .LSomeOtherFunction_bitcast
# CHECK-NEXT: Type: FUNCTION (0x0)
# CHECK-NEXT: Flags [ (0x2)
# CHECK-NEXT: BINDING_LOCAL (0x2)
# CHECK-NEXT: ]
# CHECK-NEXT: ElementIndex: 0x3
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: SomeOtherFunction
# CHECK-NEXT: Type: FUNCTION (0x0)
# CHECK-NEXT: Flags [ (0x10)
# CHECK-NEXT: UNDEFINED (0x10)
# CHECK-NEXT: ]
# CHECK-NEXT: ImportName: SomeOtherFunction
# CHECK-NEXT: ImportModule: env
# CHECK-NEXT: ElementIndex: 0x1
# CHECK-NEXT: }
# CHECK-NEXT: ]