/
xcoff-auxiliary-header.test
126 lines (116 loc) · 5.39 KB
/
xcoff-auxiliary-header.test
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# REQUIRES: system-aix
## This file tests the ability of llvm-readobj to display the auxiliary header for 64 bits XCOFF and 32 bits XCOFF object file.
# RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-64-xlc-exec 2>&1 | \
# RUN: FileCheck --check-prefixes=XLC64EXEC,WARN64 %s
# RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-exec | \
# RUN: FileCheck --check-prefix=XLC32EXEC %s
# RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-obj.o | \
# RUN: FileCheck --check-prefix=XLC32OBJ %s
# RUN: llvm-readobj --headers %p/Inputs/xcoff-32-xlc-obj.o | \
# RUN: FileCheck --check-prefix=XLC32OBJ %s
# RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-obj-malform.o 2>&1 | \
# RUN: FileCheck --check-prefixes=XLC32OBJ-PART,WARN-PART %s
# XLC32EXEC: File: {{.*}}xcoff-32-xlc-exec
# XLC32EXEC-NEXT: Format: aixcoff-rs6000
# XLC32EXEC-NEXT: Arch: powerpc
# XLC32EXEC-NEXT: AddressSize: 32bit
# XLC32EXEC-NEXT: AuxiliaryHeader {
# XLC32EXEC-NEXT: Magic: 0x10B
# XLC32EXEC-NEXT: Version: 0x1
# XLC32EXEC-NEXT: Size of .text section: 0x498
# XLC32EXEC-NEXT: Size of .data section: 0xF0
# XLC32EXEC-NEXT: Size of .bss section: 0x4
# XLC32EXEC-NEXT: Entry point address: 0x20000658
# XLC32EXEC-NEXT: .text section start address: 0x10000128
# XLC32EXEC-NEXT: .data section start address: 0x200005C0
# XLC32EXEC-NEXT: TOC anchor address: 0x2000066C
# XLC32EXEC-NEXT: Section number of entryPoint: 2
# XLC32EXEC-NEXT: Section number of .text: 1
# XLC32EXEC-NEXT: Section number of .data: 2
# XLC32EXEC-NEXT: Section number of TOC: 2
# XLC32EXEC-NEXT: Section number of loader data: 4
# XLC32EXEC-NEXT: Section number of .bss: 3
# XLC32EXEC-NEXT: Maxium alignment of .text: 0x7
# XLC32EXEC-NEXT: Maxium alignment of .data: 0x3
# XLC32EXEC-NEXT: Module type: 0x314C
# XLC32EXEC-NEXT: CPU type of objects: 0x0
# XLC32EXEC-NEXT: (Reserved): 0x0
# XLC32EXEC-NEXT: Maximum stack size: 0x0
# XLC32EXEC-NEXT: Maximum data size: 0x0
# XLC32EXEC-NEXT: Reserved for debugger: 0x0
# XLC32EXEC-NEXT: Text page size: 0x0
# XLC32EXEC-NEXT: Data page size: 0x0
# XLC32EXEC-NEXT: Stack page size: 0x0
# XLC32EXEC-NEXT: Flag: 0x0
# XLC32EXEC-NEXT: Alignment of thread-local storage: 0x0
# XLC32EXEC-NEXT: Section number for .tdata: 0
# XLC32EXEC-NEXT: Section number for .tbss: 0
# XLC32EXEC-NEXT: }
# XLC64EXEC: File: {{.*}}xcoff-64-xlc-exec
# XLC64EXEC-NEXT: Format: aix5coff64-rs6000
# XLC64EXEC-NEXT: Arch: powerpc64
# XLC64EXEC-NEXT: AddressSize: 64bit
# XLC64EXEC-NEXT: AuxiliaryHeader {
# XLC64EXEC-NEXT: Magic: 0x10B
# XLC64EXEC-NEXT: Version: 0x1
# XLC64EXEC-NEXT: Reserved for debugger: 0x0
# XLC64EXEC-NEXT: .text section start address: 0x1000001F8
# XLC64EXEC-NEXT: .data section start address: 0x110000640
# XLC64EXEC-NEXT: TOC anchor address: 0x110000738
# XLC64EXEC-NEXT: Section number of entryPoint: 2
# XLC64EXEC-NEXT: Section number of .text: 1
# XLC64EXEC-NEXT: Section number of .data: 2
# XLC64EXEC-NEXT: Section number of TOC: 2
# XLC64EXEC-NEXT: Section number of loader data: 4
# XLC64EXEC-NEXT: Section number of .bss: 3
# XLC64EXEC-NEXT: Maxium alignment of .text: 0x7
# XLC64EXEC-NEXT: Maxium alignment of .data: 0x3
# XLC64EXEC-NEXT: Module type: 0x314C
# XLC64EXEC-NEXT: CPU type of objects: 0x0
# XLC64EXEC-NEXT: (Reserved): 0x0
# XLC64EXEC-NEXT: Text page size: 0x0
# XLC64EXEC-NEXT: Data page size: 0x0
# XLC64EXEC-NEXT: Stack page size: 0x0
# XLC64EXEC-NEXT: Flag: 0x0
# XLC64EXEC-NEXT: Alignment of thread-local storage: 0x0
# XLC64EXEC-NEXT: Size of .text section: 0x448
# XLC64EXEC-NEXT: Size of .data section: 0x180
# XLC64EXEC-NEXT: Size of .bss section: 0x8
# XLC64EXEC-NEXT: Entry point address: 0x110000710
# XLC64EXEC-NEXT: Maximum stack size: 0x0
# XLC64EXEC-NEXT: Maximum data size: 0x0
# XLC64EXEC-NEXT: Section number for .tdata: 0
# XLC64EXEC-NEXT: Section number for .tbss: 0
# XLC64EXEC-NEXT: Additional flags 64-bit XCOFF: 0x0
# WARN64: {{.*}}llvm-readobj: warning: '<stdin>': There are extra data beyond auxiliary header
# XLC64EXEC-NEXT: Extra raw data: (00 00 00 00 00 00 00 00 00 00)
# XLC64EXEC-NEXT: }
# XLC32OBJ: File: {{.*}}xcoff-32-xlc-obj.o
# XLC32OBJ-NEXT: Format: aixcoff-rs6000
# XLC32OBJ-NEXT: Arch: powerpc
# XLC32OBJ-NEXT: AddressSize: 32bit
# XLC32OBJ: AuxiliaryHeader {
# XLC32OBJ-NEXT: Magic: 0x10B
# XLC32OBJ-NEXT: Version: 0x0
# XLC32OBJ-NEXT: Size of .text section: 0x200
# XLC32OBJ-NEXT: Size of .data section: 0x3C
# XLC32OBJ-NEXT: Size of .bss section: 0x0
# XLC32OBJ-NEXT: Entry point address: 0x0
# XLC32OBJ-NEXT: .text section start address: 0x0
# XLC32OBJ-NEXT: .data section start address: 0x200
# XLC32OBJ-NEXT: }
# XLC32OBJ-PART: File: {{.*}}xcoff-32-xlc-obj-malform.o
# XLC32OBJ-PART-NEXT: Format: aixcoff-rs6000
# XLC32OBJ-PART-NEXT: Arch: powerpc
# XLC32OBJ-PART-NEXT: AddressSize: 32bit
# XLC32OBJ-PART-NEXT: AuxiliaryHeader {
# XLC32OBJ-PART-NEXT: Magic: 0x10B
# XLC32OBJ-PART-NEXT: Version: 0x0
# XLC32OBJ-PART-NEXT: Size of .text section: 0x200
# XLC32OBJ-PART-NEXT: Size of .data section: 0x3C
# XLC32OBJ-PART-NEXT: Size of .bss section: 0x0
# XLC32OBJ-PART-NEXT: Entry point address: 0x0
# XLC32OBJ-PART-NEXT: .text section start address: 0x0
# WARN-PART: {{.*}}llvm-readobj: warning: '<stdin>': Only partial field for .data section start address at offset (24).
# XLC32OBJ-PART-NEXT: Raw data: (00 00 02)
# XLC32OBJ-PART-NEXT: }