| # 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: } |
| |