2 ## This file tests the ability of llvm-readobj to display the auxiliary header for 64 bits XCOFF and 32 bits XCOFF object file.
3 # RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-64-xlc-exec 2>&1 | \
4 # RUN: FileCheck --check-prefixes=XLC64EXEC,WARN64 %s
6 # RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-exec | \
7 # RUN: FileCheck --check-prefix=XLC32EXEC %s
9 # RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-obj.o | \
10 # RUN: FileCheck --check-prefix=XLC32OBJ %s
12 # RUN: llvm-readobj --headers %p/Inputs/xcoff-32-xlc-obj.o | \
13 # RUN: FileCheck --check-prefix=XLC32OBJ %s
15 # RUN: llvm-readobj --auxiliary-header %p/Inputs/xcoff-32-xlc-obj-malform.o 2>&1 | \
16 # RUN: FileCheck --check-prefixes=XLC32OBJ-PART,WARN-PART %s
18 # XLC32EXEC: File: {{.*}}xcoff-32-xlc-exec
19 # XLC32EXEC-NEXT: Format: aixcoff-rs6000
20 # XLC32EXEC-NEXT: Arch: powerpc
21 # XLC32EXEC-NEXT: AddressSize: 32bit
22 # XLC32EXEC-NEXT: AuxiliaryHeader {
23 # XLC32EXEC-NEXT: Magic: 0x10B
24 # XLC32EXEC-NEXT: Version: 0x1
25 # XLC32EXEC-NEXT: Size of .text section: 0x498
26 # XLC32EXEC-NEXT: Size of .data section: 0xF0
27 # XLC32EXEC-NEXT: Size of .bss section: 0x4
28 # XLC32EXEC-NEXT: Entry point address: 0x20000658
29 # XLC32EXEC-NEXT: .text section start address: 0x10000128
30 # XLC32EXEC-NEXT: .data section start address: 0x200005C0
31 # XLC32EXEC-NEXT: TOC anchor address: 0x2000066C
32 # XLC32EXEC-NEXT: Section number of entryPoint: 2
33 # XLC32EXEC-NEXT: Section number of .text: 1
34 # XLC32EXEC-NEXT: Section number of .data: 2
35 # XLC32EXEC-NEXT: Section number of TOC: 2
36 # XLC32EXEC-NEXT: Section number of loader data: 4
37 # XLC32EXEC-NEXT: Section number of .bss: 3
38 # XLC32EXEC-NEXT: Maxium alignment of .text: 0x7
39 # XLC32EXEC-NEXT: Maxium alignment of .data: 0x3
40 # XLC32EXEC-NEXT: Module type: 0x314C
41 # XLC32EXEC-NEXT: CPU type of objects: 0x0
42 # XLC32EXEC-NEXT: (Reserved): 0x0
43 # XLC32EXEC-NEXT: Maximum stack size: 0x0
44 # XLC32EXEC-NEXT: Maximum data size: 0x0
45 # XLC32EXEC-NEXT: Reserved for debugger: 0x0
46 # XLC32EXEC-NEXT: Text page size: 0x0
47 # XLC32EXEC-NEXT: Data page size: 0x0
48 # XLC32EXEC-NEXT: Stack page size: 0x0
49 # XLC32EXEC-NEXT: Flag: 0x0
50 # XLC32EXEC-NEXT: Alignment of thread-local storage: 0x0
51 # XLC32EXEC-NEXT: Section number for .tdata: 0
52 # XLC32EXEC-NEXT: Section number for .tbss: 0
56 # XLC64EXEC: File: {{.*}}xcoff-64-xlc-exec
57 # XLC64EXEC-NEXT: Format: aix5coff64-rs6000
58 # XLC64EXEC-NEXT: Arch: powerpc64
59 # XLC64EXEC-NEXT: AddressSize: 64bit
60 # XLC64EXEC-NEXT: AuxiliaryHeader {
61 # XLC64EXEC-NEXT: Magic: 0x10B
62 # XLC64EXEC-NEXT: Version: 0x1
63 # XLC64EXEC-NEXT: Reserved for debugger: 0x0
64 # XLC64EXEC-NEXT: .text section start address: 0x1000001F8
65 # XLC64EXEC-NEXT: .data section start address: 0x110000640
66 # XLC64EXEC-NEXT: TOC anchor address: 0x110000738
67 # XLC64EXEC-NEXT: Section number of entryPoint: 2
68 # XLC64EXEC-NEXT: Section number of .text: 1
69 # XLC64EXEC-NEXT: Section number of .data: 2
70 # XLC64EXEC-NEXT: Section number of TOC: 2
71 # XLC64EXEC-NEXT: Section number of loader data: 4
72 # XLC64EXEC-NEXT: Section number of .bss: 3
73 # XLC64EXEC-NEXT: Maxium alignment of .text: 0x7
74 # XLC64EXEC-NEXT: Maxium alignment of .data: 0x3
75 # XLC64EXEC-NEXT: Module type: 0x314C
76 # XLC64EXEC-NEXT: CPU type of objects: 0x0
77 # XLC64EXEC-NEXT: (Reserved): 0x0
78 # XLC64EXEC-NEXT: Text page size: 0x0
79 # XLC64EXEC-NEXT: Data page size: 0x0
80 # XLC64EXEC-NEXT: Stack page size: 0x0
81 # XLC64EXEC-NEXT: Flag: 0x0
82 # XLC64EXEC-NEXT: Alignment of thread-local storage: 0x0
83 # XLC64EXEC-NEXT: Size of .text section: 0x448
84 # XLC64EXEC-NEXT: Size of .data section: 0x180
85 # XLC64EXEC-NEXT: Size of .bss section: 0x8
86 # XLC64EXEC-NEXT: Entry point address: 0x110000710
87 # XLC64EXEC-NEXT: Maximum stack size: 0x0
88 # XLC64EXEC-NEXT: Maximum data size: 0x0
89 # XLC64EXEC-NEXT: Section number for .tdata: 0
90 # XLC64EXEC-NEXT: Section number for .tbss: 0
91 # XLC64EXEC-NEXT: Additional flags 64-bit XCOFF: 0x0
92 # WARN64: {{.*}}llvm-readobj: warning: '<stdin>': There are extra data beyond auxiliary header
93 # XLC64EXEC-NEXT: Extra raw data: (00 00 00 00 00 00 00 00 00 00)
96 # XLC32OBJ: File: {{.*}}xcoff-32-xlc-obj.o
97 # XLC32OBJ-NEXT: Format: aixcoff-rs6000
98 # XLC32OBJ-NEXT: Arch: powerpc
99 # XLC32OBJ-NEXT: AddressSize: 32bit
100 # XLC32OBJ: AuxiliaryHeader {
101 # XLC32OBJ-NEXT: Magic: 0x10B
102 # XLC32OBJ-NEXT: Version: 0x0
103 # XLC32OBJ-NEXT: Size of .text section: 0x200
104 # XLC32OBJ-NEXT: Size of .data section: 0x3C
105 # XLC32OBJ-NEXT: Size of .bss section: 0x0
106 # XLC32OBJ-NEXT: Entry point address: 0x0
107 # XLC32OBJ-NEXT: .text section start address: 0x0
108 # XLC32OBJ-NEXT: .data section start address: 0x200
111 # XLC32OBJ-PART: File: {{.*}}xcoff-32-xlc-obj-malform.o
112 # XLC32OBJ-PART-NEXT: Format: aixcoff-rs6000
113 # XLC32OBJ-PART-NEXT: Arch: powerpc
114 # XLC32OBJ-PART-NEXT: AddressSize: 32bit
115 # XLC32OBJ-PART-NEXT: AuxiliaryHeader {
116 # XLC32OBJ-PART-NEXT: Magic: 0x10B
117 # XLC32OBJ-PART-NEXT: Version: 0x0
118 # XLC32OBJ-PART-NEXT: Size of .text section: 0x200
119 # XLC32OBJ-PART-NEXT: Size of .data section: 0x3C
120 # XLC32OBJ-PART-NEXT: Size of .bss section: 0x0
121 # XLC32OBJ-PART-NEXT: Entry point address: 0x0
122 # XLC32OBJ-PART-NEXT: .text section start address: 0x0
123 # WARN-PART: {{.*}}llvm-readobj: warning: '<stdin>': Only partial field for .data section start address at offset (24).
124 # XLC32OBJ-PART-NEXT: Raw data: (00 00 02)
125 # XLC32OBJ-PART-NEXT: }