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