124 lines · yaml
1## Test that we can explicitly specify all fields of the auxiliary file header.2## Notice that the values aren't derived from the sections if we explicitly set the fields.3 4# RUN: yaml2obj %s -o %t15# RUN: llvm-readobj --auxiliary-header %t1 | FileCheck %s --check-prefix=CHECK326# RUN: yaml2obj %s -DMAGIC=0x1F7 -DFLAG64=0x2 -o %t27# RUN: llvm-readobj --auxiliary-header %t2 | FileCheck %s --check-prefix=CHECK648 9# CHECK32: Format: aixcoff-rs600010# CHECK32-NEXT: Arch: powerpc11# CHECK32-NEXT: AddressSize: 32bit12# CHECK32-NEXT: AuxiliaryHeader {13# CHECK32-NEXT: Magic: 0x10B14# CHECK32-NEXT: Version: 0x115# CHECK32-NEXT: Size of .text section: 0x816# CHECK32-NEXT: Size of .data section: 0x917# CHECK32-NEXT: Size of .bss section: 0x1018# CHECK32-NEXT: Entry point address: 0x111119# CHECK32-NEXT: .text section start address: 0x222220# CHECK32-NEXT: .data section start address: 0x333321# CHECK32-NEXT: TOC anchor address: 0x444422# CHECK32-NEXT: Section number of entryPoint: 123# CHECK32-NEXT: Section number of .text: 224# CHECK32-NEXT: Section number of .data: 325# CHECK32-NEXT: Section number of TOC: 426# CHECK32-NEXT: Section number of loader data: 527# CHECK32-NEXT: Section number of .bss: 628# CHECK32-NEXT: Maxium alignment of .text: 0x729# CHECK32-NEXT: Maxium alignment of .data: 0x330# CHECK32-NEXT: Module type: 0x031# CHECK32-NEXT: CPU type of objects: 0x132# CHECK32-NEXT: (Reserved): 0x033# CHECK32-NEXT: Maximum stack size: 0x034# CHECK32-NEXT: Maximum data size: 0x035# CHECK32-NEXT: Reserved for debugger: 0x036# CHECK32-NEXT: Text page size: 0x137# CHECK32-NEXT: Data page size: 0x138# CHECK32-NEXT: Stack page size: 0x139# CHECK32-NEXT: Flag: 0x040# CHECK32-NEXT: Alignment of thread-local storage: 0x141# CHECK32-NEXT: Section number for .tdata: 742# CHECK32-NEXT: Section number for .tbss: 843# CHECK32-NEXT: }44 45# CHECK64: Format: aix5coff64-rs600046# CHECK64-NEXT: Arch: powerpc6447# CHECK64-NEXT: AddressSize: 64bit48# CHECK64-NEXT: AuxiliaryHeader {49# CHECK64-NEXT: Magic: 0x10B50# CHECK64-NEXT: Version: 0x151# CHECK64-NEXT: Reserved for debugger: 0x052# CHECK64-NEXT: .text section start address: 0x222253# CHECK64-NEXT: .data section start address: 0x333354# CHECK64-NEXT: TOC anchor address: 0x444455# CHECK64-NEXT: Section number of entryPoint: 156# CHECK64-NEXT: Section number of .text: 257# CHECK64-NEXT: Section number of .data: 358# CHECK64-NEXT: Section number of TOC: 459# CHECK64-NEXT: Section number of loader data: 560# CHECK64-NEXT: Section number of .bss: 661# CHECK64-NEXT: Maxium alignment of .text: 0x762# CHECK64-NEXT: Maxium alignment of .data: 0x363# CHECK64-NEXT: Module type: 0x064# CHECK64-NEXT: CPU type of objects: 0x165# CHECK64-NEXT: (Reserved): 0x066# CHECK64-NEXT: Text page size: 0x167# CHECK64-NEXT: Data page size: 0x168# CHECK64-NEXT: Stack page size: 0x169# CHECK64-NEXT: Flag: 0x070# CHECK64-NEXT: Alignment of thread-local storage: 0x171# CHECK64-NEXT: Size of .text section: 0x872# CHECK64-NEXT: Size of .data section: 0x973# CHECK64-NEXT: Size of .bss section: 0x1074# CHECK64-NEXT: Entry point address: 0x111175# CHECK64-NEXT: Maximum stack size: 0x076# CHECK64-NEXT: Maximum data size: 0x077# CHECK64-NEXT: Section number for .tdata: 778# CHECK64-NEXT: Section number for .tbss: 879# CHECK64-NEXT: Additional flags 64-bit XCOFF: 0x280# CHECK64-NEXT: }81 82--- !XCOFF83FileHeader:84 MagicNumber: [[MAGIC=0x1DF]]85AuxiliaryHeader:86 Magic: 0x10B87 Version: 0x188 TextSectionSize: 0x889 DataSectionSize: 0x990 BssSectionSize: 0x1091 EntryPointAddr: 0x111192 TextStartAddr: 0x222293 DataStartAddr: 0x333394 TOCAnchorAddr: 0x444495 SecNumOfEntryPoint: 196 SecNumOfText: 297 SecNumOfData: 398 SecNumOfTOC: 499 SecNumOfLoader: 5100 SecNumOfBSS: 6101 MaxAlignOfText: 0x7102 MaxAlignOfData: 0x3103 ModuleType: 0x1104 TextPageSize: 0x1105 DataPageSize: 0x1106 StackPageSize: 0x1107 SecNumOfTData: 7108 SecNumOfTBSS: 8109 FlagAndTDataAlignment: 0x1110 Flag: [[FLAG64=<none>]]111Sections:112 - Flags: [ STYP_TEXT ]113 SectionData: "1232"114 - Flags: [ STYP_DATA ]115 SectionData: "5678"116 - Flags: [ STYP_BSS ]117 SectionData: "9101"118 - Flags: [ STYP_TDATA ]119 SectionData: "1112"120 - Flags: [ STYP_TBSS ]121 SectionData: "1314"122 - Flags: [ STYP_LOADER ]123 SectionData: "1516"124