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
52
53
54
55
56
57
58
59
60
61
62
63
64
| # RUN: llvm-objcopy %p/Inputs/dynsym.so %t
# RUN: llvm-readobj --dyn-symbols %t | FileCheck %s
# RUN: llvm-readobj --sections %t | FileCheck --check-prefix=LINK %s
#LINK: Name: .dynsym
#LINK-NEXT: Type: SHT_DYNSYM
#LINK-NEXT: Flags [
#LINK-NEXT: SHF_ALLOC
#LINK-NEXT: ]
#LINK-NEXT: Address:
#LINK-NEXT: Offset:
#LINK-NEXT: Size:
#LINK-NEXT: Link: 3
#LINK: Index: 3
#LINK-NEXT: Name: .dynstr
#CHECK: DynamicSymbols [
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: (0)
#CHECK-NEXT: Value: 0x0
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Local
#CHECK-NEXT: Type: None (0x0)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: Undefined (0x0)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: bang (1)
#CHECK-NEXT: Value: 0x4000
#CHECK-NEXT: Size: 8
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: Object (0x1)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: .bss (0x7)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: bar (6)
#CHECK-NEXT: Value: 0x1001
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: Function (0x2)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: .text (0x4)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: baz (10)
#CHECK-NEXT: Value: 0x2000
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: Object (0x1)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: .data (0x5)
#CHECK-NEXT: }
#CHECK-NEXT: Symbol {
#CHECK-NEXT: Name: foo (14)
#CHECK-NEXT: Value: 0x1000
#CHECK-NEXT: Size: 0
#CHECK-NEXT: Binding: Global (0x1)
#CHECK-NEXT: Type: Function (0x2)
#CHECK-NEXT: Other: 0
#CHECK-NEXT: Section: .text (0x4)
#CHECK-NEXT: }
#CHECK-NEXT:]
|