blob: 917db8b05e48cd22b871d08a65339f4fda65aa28 (
plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
## Test how relocations are dumped.
# RUN: yaml2obj %s -o %t
# RUN: llvm-readobj --relocs --expand-relocs %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,NODEMANEXP
# RUN: llvm-readobj --relocs %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN
# RUN: llvm-readobj --relocs --expand-relocs --no-demangle %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,NODEMANEXP
# RUN: llvm-readobj --relocs --no-demangle %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,NODEMAN
# RUN: llvm-readobj --relocs --expand-relocs --demangle %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCSEXP,DEMANEXP
# RUN: llvm-readobj --relocs --demangle %t | \
# RUN: FileCheck %s --strict-whitespace --check-prefixes=RELOCS,DEMAN
# RELOCSEXP:Relocations [
# RELOCSEXP-NEXT: Section (index: 1) .text {
# RELOCSEXP-NEXT: Relocation {
# RELOCSEXP-NEXT: Virtual Address: 0x80
# RELOCSEXP-NEXT: Symbol: foo (0)
# RELOCSEXP-NEXT: IsSigned: No
# RELOCSEXP-NEXT: FixupBitValue: 0
# RELOCSEXP-NEXT: Length: 22
# RELOCSEXP-NEXT: Type: R_POS (0x0)
# RELOCSEXP-NEXT: }
# RELOCSEXP-NEXT: Relocation {
# RELOCSEXP-NEXT: Virtual Address: 0x100
# RELOCSEXP-NEXT: Symbol: foo (0)
# RELOCSEXP-NEXT: IsSigned: No
# RELOCSEXP-NEXT: FixupBitValue: 0
# RELOCSEXP-NEXT: Length: 21
# RELOCSEXP-NEXT: Type: R_REL (0x2)
# RELOCSEXP-NEXT: }
# RELOCSEXP-NEXT: }
# RELOCSEXP-NEXT: Section (index: 2) .data {
# RELOCSEXP-NEXT: Relocation {
# RELOCSEXP-NEXT: Virtual Address: 0x200
# NODEMANEXP-NEXT: Symbol: _Z3fwpv (1)
# DEMANEXP-NEXT: Symbol: fwp() (1)
# RELOCSEXP-NEXT: IsSigned: No
# RELOCSEXP-NEXT: FixupBitValue: 0
# RELOCSEXP-NEXT: Length: 20
# RELOCSEXP-NEXT: Type: R_TOC (0x3)
# RELOCSEXP-NEXT: }
# RELOCSEXP-NEXT: }
# RELOCSEXP-NEXT:]
# RELOCS:Relocations [
# RELOCS-NEXT: Section (index: 1) .text {
# RELOCS-NEXT: 0x80 R_POS foo(0) 0x15
# RELOCS-NEXT: 0x100 R_REL foo(0) 0x14
# RELOCS-NEXT: }
# RELOCS-NEXT: Section (index: 2) .data {
# NODEMAN-NEXT: 0x200 R_TOC _Z3fwpv(1) 0x13
# DEMAN-NEXT: 0x200 R_TOC fwp()(1) 0x13
# RELOCS-NEXT: }
# RELOCS-NEXT:]
--- !XCOFF
FileHeader:
MagicNumber: 0x01DF
Sections:
- Name: .text
Flags: [ STYP_TEXT ]
Relocations:
- Address: 0x80
Symbol: 0x0
Info: 0x15
Type: 0x0
- Address: 0x100
Symbol: 0x0
Info: 0x14
Type: 0x2
- Name: .data
Flags: [ STYP_DATA ]
Relocations:
- Address: 0x200
Symbol: 0x1
Info: 0x13
Type: 0x3
Symbols:
- Name: foo
Value: 0x0
Section: .text
- Name: _Z3fwpv
Value: 0x80
Section: .data
|