diff --git a/llvm/lib/MC/XCOFFObjectWriter.cpp b/llvm/lib/MC/XCOFFObjectWriter.cpp --- a/llvm/lib/MC/XCOFFObjectWriter.cpp +++ b/llvm/lib/MC/XCOFFObjectWriter.cpp @@ -193,6 +193,7 @@ uint64_t SymbolTableOffset = 0; uint16_t SectionCount = 0; uint64_t RelocationEntryOffset = 0; + StringRef SourceFileName = ".file"; support::endian::Writer W; std::unique_ptr TargetObjectWriter; @@ -249,7 +250,7 @@ uint64_t writeObject(MCAssembler &, const MCAsmLayout &) override; bool is64Bit() const { return TargetObjectWriter->is64Bit(); } - static bool nameShouldBeInStringTable(const StringRef &); + bool nameShouldBeInStringTable(const StringRef &); void writeSymbolName(const StringRef &); void writeSymbolEntryForCsectMemberLabel(const Symbol &SymbolRef, @@ -267,18 +268,18 @@ void writeSectionForControlSectionEntry(const MCAssembler &Asm, const MCAsmLayout &Layout, const CsectSectionEntry &CsectEntry, - uint32_t &CurrentAddressLocation); + uint64_t &CurrentAddressLocation); void writeSectionForDwarfSectionEntry(const MCAssembler &Asm, const MCAsmLayout &Layout, const DwarfSectionEntry &DwarfEntry, - uint32_t &CurrentAddressLocation); + uint64_t &CurrentAddressLocation); void writeSymbolTable(const MCAsmLayout &Layout); - void writeSymbolAuxDwarfEntry(uint32_t LengthOfSectionPortion, - uint32_t NumberOfRelocEnt = 0); - void writeSymbolAuxCsectEntry(uint32_t SectionOrLength, + void writeSymbolAuxDwarfEntry(uint64_t LengthOfSectionPortion, + uint64_t NumberOfRelocEnt = 0); + void writeSymbolAuxCsectEntry(uint64_t SectionOrLength, uint8_t SymbolAlignmentAndType, uint8_t StorageMappingClass); - void writeSymbolEntry(StringRef SymbolName, uint32_t Value, + void writeSymbolEntry(StringRef SymbolName, uint64_t Value, int16_t SectionNumber, uint16_t SymbolType, uint8_t StorageClass, uint8_t NumberOfAuxEntries = 1); void writeRelocations(); @@ -486,6 +487,10 @@ Strings.add(XSym->getSymbolTableName()); } + // The first symbol entry is for the source file's name. + if (nameShouldBeInStringTable(SourceFileName)) + Strings.add(SourceFileName); + Strings.finalize(); assignAddressesAndIndices(Layout); } @@ -605,8 +610,7 @@ void XCOFFObjectWriter::writeSections(const MCAssembler &Asm, const MCAsmLayout &Layout) { - assert(!is64Bit() && "Writing 64-bit sections is not yet supported."); - uint32_t CurrentAddressLocation = 0; + uint64_t CurrentAddressLocation = 0; for (const auto *Section : Sections) writeSectionForControlSectionEntry(Asm, Layout, *Section, CurrentAddressLocation); @@ -628,21 +632,17 @@ writeFileHeader(); writeSectionHeaderTable(); - - if (!is64Bit()) { - writeSections(Asm, Layout); - writeRelocations(); - - writeSymbolTable(Layout); - // Write the string table. - Strings.write(W.OS); - } + writeSections(Asm, Layout); + writeRelocations(); + writeSymbolTable(Layout); + // Write the string table. + Strings.write(W.OS); return W.OS.tell() - StartOffset; } bool XCOFFObjectWriter::nameShouldBeInStringTable(const StringRef &SymbolName) { - return SymbolName.size() > XCOFF::NameSize; + return SymbolName.size() > XCOFF::NameSize || is64Bit(); } void XCOFFObjectWriter::writeSymbolName(const StringRef &SymbolName) { @@ -658,13 +658,18 @@ } } -void XCOFFObjectWriter::writeSymbolEntry(StringRef SymbolName, uint32_t Value, +void XCOFFObjectWriter::writeSymbolEntry(StringRef SymbolName, uint64_t Value, int16_t SectionNumber, uint16_t SymbolType, uint8_t StorageClass, uint8_t NumberOfAuxEntries) { - writeSymbolName(SymbolName); - W.write(Value); + if (is64Bit()) { + W.write(Value); + W.write(Strings.getOffset(SymbolName)); + } else { + writeSymbolName(SymbolName); + W.write(Value); + } W.write(SectionNumber); // Basic/Derived type. See the description of the n_type field for symbol // table entries for a detailed description. Since we don't yet support @@ -678,24 +683,36 @@ W.write(NumberOfAuxEntries); } -void XCOFFObjectWriter::writeSymbolAuxCsectEntry(uint32_t SectionOrLength, +void XCOFFObjectWriter::writeSymbolAuxCsectEntry(uint64_t SectionOrLength, uint8_t SymbolAlignmentAndType, uint8_t StorageMappingClass) { - W.write(SectionOrLength); + W.write(is64Bit() ? Lo_32(SectionOrLength) : SectionOrLength); W.write(0); // ParameterHashIndex W.write(0); // TypeChkSectNum W.write(SymbolAlignmentAndType); W.write(StorageMappingClass); - W.write(0); // StabInfoIndex - W.write(0); // StabSectNum + if (is64Bit()) { + W.write(Hi_32(SectionOrLength)); + W.OS.write_zeros(1); // Reserved + W.write(XCOFF::AUX_CSECT); + } else { + W.write(0); // StabInfoIndex + W.write(0); // StabSectNum + } } void XCOFFObjectWriter::writeSymbolAuxDwarfEntry( - uint32_t LengthOfSectionPortion, uint32_t NumberOfRelocEnt) { - W.write(LengthOfSectionPortion); - W.OS.write_zeros(4); // Reserved - W.write(NumberOfRelocEnt); - W.OS.write_zeros(6); // Reserved + uint64_t LengthOfSectionPortion, uint64_t NumberOfRelocEnt) { + writeWord(LengthOfSectionPortion); + if (!is64Bit()) + W.OS.write_zeros(4); // Reserved + writeWord(NumberOfRelocEnt); + if (is64Bit()) { + W.OS.write_zeros(1); // Reserved + W.write(XCOFF::AUX_SECT); + } else { + W.OS.write_zeros(6); // Reserved + } } void XCOFFObjectWriter::writeSymbolEntryForCsectMemberLabel( @@ -741,7 +758,7 @@ W.write(0); // AuxHeaderSize. No optional header for an object // file that is not to be loaded. W.write(0); // Flags - W.write(0); // SymbolTableEntryCount. Not supported yet. + W.write(SymbolTableEntryCount); } else { W.write(SymbolTableEntryCount); W.write(0); // AuxHeaderSize. No optional header for an object @@ -772,7 +789,7 @@ writeWord(0); // FileOffsetToLineNumberInfo. Not supported yet. if (is64Bit()) { - W.write(0); // NumberOfRelocations. Not yet supported in 64-bit. + W.write(Sec->RelocationCount); W.write(0); // NumberOfLineNumbers. Not supported yet. W.write(Sec->Flags); W.OS.write_zeros(4); @@ -793,13 +810,12 @@ void XCOFFObjectWriter::writeRelocation(XCOFFRelocation Reloc, const XCOFFSection &Section) { - assert(!is64Bit() && "Writing 64-bit relocation is not yet supported."); if (Section.MCSec->isCsect()) - W.write(Section.Address + Reloc.FixupOffsetInCsect); + writeWord(Section.Address + Reloc.FixupOffsetInCsect); else { // DWARF sections' address is set to 0. assert(Section.MCSec->isDwarfSect() && "unsupport section type!"); - W.write(Reloc.FixupOffsetInCsect); + writeWord(Reloc.FixupOffsetInCsect); } W.write(Reloc.SymbolTableIndex); W.write(Reloc.SignAndSize); @@ -829,14 +845,13 @@ } void XCOFFObjectWriter::writeSymbolTable(const MCAsmLayout &Layout) { - assert(!is64Bit() && "Writing 64-bit symbol table is not yet supported."); // Write symbol 0 as C_FILE. - // FIXME: support 64-bit C_FILE symbol. // The n_name of a C_FILE symbol is the source file's name when no auxiliary // entries are present. The source file's name is alternatively provided by an // auxiliary entry, in which case the n_name of the C_FILE symbol is `.file`. // FIXME: add the real source file's name. - writeSymbolEntry(".file", /*Value=*/0, XCOFF::ReservedSectionNum::N_DEBUG, + writeSymbolEntry(SourceFileName, /*Value=*/0, + XCOFF::ReservedSectionNum::N_DEBUG, /*SymbolType=*/0, XCOFF::C_FILE, /*NumberOfAuxEntries=*/0); @@ -884,8 +899,10 @@ for (auto &Csect : *Group) { const size_t CsectRelocCount = Csect.Relocations.size(); - if (CsectRelocCount >= XCOFF::RelocOverflow || - Section->RelocationCount >= XCOFF::RelocOverflow - CsectRelocCount) + // An XCOFF64 file may not contain an overflow section header. + if (!is64Bit() && (CsectRelocCount >= XCOFF::RelocOverflow || + Section->RelocationCount >= + XCOFF::RelocOverflow - CsectRelocCount)) report_fatal_error( "relocation entries overflowed; overflow section is " "not implemented yet"); @@ -908,8 +925,10 @@ return false; Sec->FileOffsetToRelocations = RawPointer; - const uint32_t RelocationSizeInSec = - Sec->RelocationCount * XCOFF::RelocationSerializationSize32; + const uint64_t RelocationSizeInSec = + Sec->RelocationCount * (is64Bit() + ? XCOFF::RelocationSerializationSize64 + : XCOFF::RelocationSerializationSize32); RawPointer += RelocationSizeInSec; if (RawPointer > MaxRawDataSize) report_fatal_error("Relocation data overflowed this object file."); @@ -946,7 +965,7 @@ // The address corrresponds to the address of sections and symbols in the // object file. We place the shared address 0 immediately after the // section header table. - uint32_t Address = 0; + uint64_t Address = 0; // Section indices are 1-based in XCOFF. int32_t SectionIndex = 1; bool HasTDataSection = false; @@ -1083,7 +1102,7 @@ void XCOFFObjectWriter::writeSectionForControlSectionEntry( const MCAssembler &Asm, const MCAsmLayout &Layout, - const CsectSectionEntry &CsectEntry, uint32_t &CurrentAddressLocation) { + const CsectSectionEntry &CsectEntry, uint64_t &CurrentAddressLocation) { // Nothing to write for this Section. if (CsectEntry.Index == SectionEntry::UninitializedIndex) return; @@ -1121,7 +1140,7 @@ // The size of the tail padding in a section is the end virtual address of // the current section minus the the end virtual address of the last csect // in that section. - if (uint32_t PaddingSize = + if (uint64_t PaddingSize = CsectEntry.Address + CsectEntry.Size - CurrentAddressLocation) { W.OS.write_zeros(PaddingSize); CurrentAddressLocation += PaddingSize; @@ -1130,7 +1149,7 @@ void XCOFFObjectWriter::writeSectionForDwarfSectionEntry( const MCAssembler &Asm, const MCAsmLayout &Layout, - const DwarfSectionEntry &DwarfEntry, uint32_t &CurrentAddressLocation) { + const DwarfSectionEntry &DwarfEntry, uint64_t &CurrentAddressLocation) { // There could be a gap (without corresponding zero padding) between // sections. For example DWARF section alignment is bigger than // DefaultSectionAlign. @@ -1138,7 +1157,7 @@ "CurrentAddressLocation should be less than or equal to section " "address."); - if (uint32_t PaddingSize = DwarfEntry.Address - CurrentAddressLocation) + if (uint64_t PaddingSize = DwarfEntry.Address - CurrentAddressLocation) W.OS.write_zeros(PaddingSize); if (DwarfEntry.Size) diff --git a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp --- a/llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp +++ b/llvm/lib/Target/PowerPC/MCTargetDesc/PPCXCOFFObjectWriter.cpp @@ -71,6 +71,19 @@ return {XCOFF::RelocationType::R_TOCL, SignAndSizeForHalf16}; } } break; + case PPC::fixup_ppc_half16ds: + case PPC::fixup_ppc_half16dq: { + if (IsPCRel) + report_fatal_error("Invalid PC-relative relocation."); + switch (Modifier) { + default: + llvm_unreachable("Unsupported Modifier"); + case MCSymbolRefExpr::VK_None: + return {XCOFF::RelocationType::R_TOC, 15}; + case MCSymbolRefExpr::VK_PPC_L: + return {XCOFF::RelocationType::R_TOCL, 15}; + } + } break; case PPC::fixup_ppc_br24: // Branches are 4 byte aligned, so the 24 bits we encode in // the instruction actually represents a 26 bit offset. @@ -78,15 +91,19 @@ case PPC::fixup_ppc_br24abs: return {XCOFF::RelocationType::R_RBA, EncodedSignednessIndicator | 25}; case FK_Data_4: + case FK_Data_8: + const uint8_t SignAndSizeForFKData = + EncodedSignednessIndicator | + ((unsigned)Fixup.getKind() == FK_Data_4 ? 31 : 63); switch (Modifier) { default: report_fatal_error("Unsupported modifier"); case MCSymbolRefExpr::VK_PPC_AIX_TLSGD: - return {XCOFF::RelocationType::R_TLS, EncodedSignednessIndicator | 31}; + return {XCOFF::RelocationType::R_TLS, SignAndSizeForFKData}; case MCSymbolRefExpr::VK_PPC_AIX_TLSGDM: - return {XCOFF::RelocationType::R_TLSM, EncodedSignednessIndicator | 31}; + return {XCOFF::RelocationType::R_TLSM, SignAndSizeForFKData}; case MCSymbolRefExpr::VK_None: - return {XCOFF::RelocationType::R_POS, EncodedSignednessIndicator | 31}; + return {XCOFF::RelocationType::R_POS, SignAndSizeForFKData}; } } } diff --git a/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll b/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll --- a/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll +++ b/llvm/test/CodeGen/PowerPC/aix-available-externally-linkage.ll @@ -1,36 +1,52 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec < %s | \ -; RUN: FileCheck %s +; RUN: -mattr=-altivec < %s | FileCheck %s ; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec < %s | \ -; RUN: FileCheck %s +; RUN: -mattr=-altivec < %s | FileCheck %s ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | \ -; RUN: FileCheck --check-prefix=XCOFF32 %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=XCOFF32 %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=XCOFF64 %s @_ZN3Foo1aE = available_externally constant i32 -1 ; CHECK: .extern _ZN3Foo1aE[UA] -; XCOFF32: Index: [[#Index:]]{{.*}}{{[[:space:]] *}}Name: _ZN3Foo1aE -; XCOFF32-NEXT: Value (RelocatableAddress): 0x0 -; XCOFF32-NEXT: Section: N_UNDEF -; XCOFF32-NEXT: Type: 0x0 -; XCOFF32-NEXT: StorageClass: C_EXT (0x2) -; XCOFF32-NEXT: NumberOfAuxEntries: 1 -; XCOFF32-NEXT: CSECT Auxiliary Entry { -; XCOFF32-NEXT: Index: [[#Index+1]] -; XCOFF32-NEXT: SectionLen: 0 -; XCOFF32-NEXT: ParameterHashIndex: 0x0 -; XCOFF32-NEXT: TypeChkSectNum: 0x0 -; XCOFF32-NEXT: SymbolAlignmentLog2: 0 -; XCOFF32-NEXT: SymbolType: XTY_ER (0x0) -; XCOFF32-NEXT: StorageMappingClass: XMC_UA (0x4) -; XCOFF32-NEXT: StabInfoIndex: 0x0 -; XCOFF32-NEXT: StabSectNum: 0x0 -; XCOFF32-NEXT: } +; XCOFF32: Index: [[#Index:]]{{.*}}{{[[:space:]] *}}Name: _ZN3Foo1aE +; XCOFF32-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF32-NEXT: Section: N_UNDEF +; XCOFF32-NEXT: Type: 0x0 +; XCOFF32-NEXT: StorageClass: C_EXT (0x2) +; XCOFF32-NEXT: NumberOfAuxEntries: 1 +; XCOFF32-NEXT: CSECT Auxiliary Entry { +; XCOFF32-NEXT: Index: [[#Index+1]] +; XCOFF32-NEXT: SectionLen: 0 +; XCOFF32-NEXT: ParameterHashIndex: 0x0 +; XCOFF32-NEXT: TypeChkSectNum: 0x0 +; XCOFF32-NEXT: SymbolAlignmentLog2: 0 +; XCOFF32-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF32-NEXT: StorageMappingClass: XMC_UA (0x4) +; XCOFF32-NEXT: StabInfoIndex: 0x0 +; XCOFF32-NEXT: StabSectNum: 0x0 +; XCOFF32-NEXT: } + +; XCOFF64: Index: [[#Index:]]{{.*}}{{[[:space:]] *}}Name: _ZN3Foo1aE +; XCOFF64-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF64-NEXT: Section: N_UNDEF +; XCOFF64-NEXT: Type: 0x0 +; XCOFF64-NEXT: StorageClass: C_EXT (0x2) +; XCOFF64-NEXT: NumberOfAuxEntries: 1 +; XCOFF64-NEXT: CSECT Auxiliary Entry { +; XCOFF64-NEXT: Index: [[#Index+1]] +; XCOFF64-NEXT: SectionLen: 0 +; XCOFF64-NEXT: ParameterHashIndex: 0x0 +; XCOFF64-NEXT: TypeChkSectNum: 0x0 +; XCOFF64-NEXT: SymbolAlignmentLog2: 0 +; XCOFF64-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF64-NEXT: StorageMappingClass: XMC_UA (0x4) +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern-weak.ll @@ -1,14 +1,20 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s | FileCheck --check-prefixes=COMMON,BIT32 %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s \ +; RUN: | FileCheck --check-prefixes=COMMON,BIT32 %s ; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s | FileCheck --check-prefixes=COMMON,BIT64 %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s \ +; RUN: | FileCheck --check-prefixes=COMMON,BIT64 %s ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false \ +; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=CHECKSYM64 %s @foo_ext_weak_p = global void (...)* bitcast (void ()* @foo_ext_weak_ref to void (...)*) @b_w = extern_weak global i32 @@ -329,3 +335,263 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] + +; CHECKSYM64: Symbols [ +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 0 +; CHECKSYM64-NEXT: Name: .file +; CHECKSYM64-NEXT: Value (SymbolTableIndex): 0x0 +; CHECKSYM64-NEXT: Section: N_DEBUG +; CHECKSYM64-NEXT: Source Language ID: TB_C (0x0) +; CHECKSYM64-NEXT: CPU Version ID: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_FILE (0x67) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 0 +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 1 +; CHECKSYM64-NEXT: Name: .foo_ext_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 2 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 3 +; CHECKSYM64-NEXT: Name: foo_ext_weak_ref +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 4 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 5 +; CHECKSYM64-NEXT: Name: b_w +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 6 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_UA (0x4) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 7 +; CHECKSYM64-NEXT: Name: .foo_ext_weak_ref +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 8 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 9 +; CHECKSYM64-NEXT: Name: foo_ext_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 10 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 11 +; CHECKSYM64-NEXT: Name: .text +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 12 +; CHECKSYM64-NEXT: SectionLen: 80 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 13 +; CHECKSYM64-NEXT: Name: .main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 14 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 11 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 15 +; CHECKSYM64-NEXT: Name: .data +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x50 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 16 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 17 +; CHECKSYM64-NEXT: Name: foo_ext_weak_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x50 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 18 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 15 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 19 +; CHECKSYM64-NEXT: Name: main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x58 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 20 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 21 +; CHECKSYM64-NEXT: Name: TOC +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 22 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC0 (0xF) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 23 +; CHECKSYM64-NEXT: Name: foo_ext_weak_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 24 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 25 +; CHECKSYM64-NEXT: Name: b_w +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x78 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 26 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-extern.ll b/llvm/test/CodeGen/PowerPC/aix-extern.ll --- a/llvm/test/CodeGen/PowerPC/aix-extern.ll +++ b/llvm/test/CodeGen/PowerPC/aix-extern.ll @@ -1,14 +1,20 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s | FileCheck --check-prefixes=COMMON,BIT32 %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s \ +; RUN: | FileCheck --check-prefixes=COMMON,BIT32 %s ; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s | FileCheck --check-prefixes=COMMON,BIT64 %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false < %s \ +; RUN: | FileCheck --check-prefixes=COMMON,BIT64 %s ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ -; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false -filetype=obj -o %t.o < %s +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false \ +; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -xcoff-traceback-table=false \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=CHECKSYM64 %s @bar_p = global i32 (...)* @bar_ref, align 4 @b_e = external global i32, align 4 @@ -392,3 +398,302 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] + +; CHECKSYM64: AddressSize: 64bit +; CHECKSYM64-NEXT: Symbols [ +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 0 +; CHECKSYM64-NEXT: Name: .file +; CHECKSYM64-NEXT: Value (SymbolTableIndex): 0x0 +; CHECKSYM64-NEXT: Section: N_DEBUG +; CHECKSYM64-NEXT: Source Language ID: TB_C (0x0) +; CHECKSYM64-NEXT: CPU Version ID: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_FILE (0x67) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 0 +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 1 +; CHECKSYM64-NEXT: Name: .bar_extern +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 2 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 3 +; CHECKSYM64-NEXT: Name: .bar_ref +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 4 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 5 +; CHECKSYM64-NEXT: Name: bar_ref +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 6 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 7 +; CHECKSYM64-NEXT: Name: b_e +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 8 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_UA (0x4) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 9 +; CHECKSYM64-NEXT: Name: bar_extern +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 10 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 11 +; CHECKSYM64-NEXT: Name: .text +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 12 +; CHECKSYM64-NEXT: SectionLen: 112 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 13 +; CHECKSYM64-NEXT: Name: .foo +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 14 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 11 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 15 +; CHECKSYM64-NEXT: Name: .main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x10 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 16 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 11 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 17 +; CHECKSYM64-NEXT: Name: .data +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 18 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 19 +; CHECKSYM64-NEXT: Name: bar_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x70 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 20 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 17 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 21 +; CHECKSYM64-NEXT: Name: foo +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x78 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 22 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 23 +; CHECKSYM64-NEXT: Name: main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 24 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 25 +; CHECKSYM64-NEXT: Name: TOC +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xA8 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 26 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC0 (0xF) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 27 +; CHECKSYM64-NEXT: Name: b_e +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xA8 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 28 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 29 +; CHECKSYM64-NEXT: Name: bar_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xB0 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 30 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-func-align.ll b/llvm/test/CodeGen/PowerPC/aix-func-align.ll --- a/llvm/test/CodeGen/PowerPC/aix-func-align.ll +++ b/llvm/test/CodeGen/PowerPC/aix-func-align.ll @@ -9,7 +9,9 @@ ; RUN: -xcoff-traceback-table=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -xcoff-traceback-table=false -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS64 %s define i32 @foo() align 32 { entry: @@ -45,3 +47,21 @@ ; SYMS-NEXT: StabSectNum: 0x0 ; SYMS-NEXT: } ; SYMS-NEXT: } + +; SYMS64: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .text +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: [[#INDX+1]] +; SYMS64-NEXT: SectionLen: 72 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 6 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-internal.ll b/llvm/test/CodeGen/PowerPC/aix-internal.ll --- a/llvm/test/CodeGen/PowerPC/aix-internal.ll +++ b/llvm/test/CodeGen/PowerPC/aix-internal.ll @@ -1,36 +1,65 @@ ; RUN: llc -mtriple powerpc-ibm-aix -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \ -; RUN: -filetype=obj -o %t.o < %s +; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mtriple powerpc64-ibm-aix -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS64 %s define internal i32 @foo() { ret i32 1 } -; CHECK: Symbol { -; CHECK: Name: .foo -; CHECK-NEXT: Value (RelocatableAddress): -; CHECK-NEXT: Section: .text -; CHECK-NEXT: Type: 0x0 -; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECK: Symbol { +; CHECK: Name: .foo +; CHECK-NEXT: Value (RelocatableAddress): +; CHECK-NEXT: Section: .text +; CHECK-NEXT: Type: 0x0 +; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) -; CHECK: Symbol { -; CHECK-NEXT: Index: [[#INDX:]] -; CHECK-NEXT: Name: foo -; CHECK-NEXT: Value (RelocatableAddress): -; CHECK-NEXT: Section: .data -; CHECK-NEXT: Type: 0x0 -; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) -; CHECK-NEXT: NumberOfAuxEntries: 1 -; CHECK-NEXT: CSECT Auxiliary Entry { -; CHECK-NEXT: Index: [[#INDX+1]] -; CHECK-NEXT: SectionLen: 12 -; CHECK-NEXT: ParameterHashIndex: -; CHECK-NEXT: TypeChkSectNum: -; CHECK-NEXT: SymbolAlignmentLog2: -; CHECK-NEXT: SymbolType: XTY_SD (0x1) -; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECK: Symbol { +; CHECK-NEXT: Index: [[#INDX:]] +; CHECK-NEXT: Name: foo +; CHECK-NEXT: Value (RelocatableAddress): +; CHECK-NEXT: Section: .data +; CHECK-NEXT: Type: 0x0 +; CHECK-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECK-NEXT: NumberOfAuxEntries: 1 +; CHECK-NEXT: CSECT Auxiliary Entry { +; CHECK-NEXT: Index: [[#INDX+1]] +; CHECK-NEXT: SectionLen: 12 +; CHECK-NEXT: ParameterHashIndex: +; CHECK-NEXT: TypeChkSectNum: +; CHECK-NEXT: SymbolAlignmentLog2: +; CHECK-NEXT: SymbolType: XTY_SD (0x1) +; CHECK-NEXT: StorageMappingClass: XMC_DS (0xA) ; Make sure no label is emitted. ; CHECK-NOT: Name: foo + +; SYMS64: Symbol { +; SYMS64: Name: .foo +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) + +; SYMS64: Symbol { +; SYMS64-NEXT: Index: [[#INDX:]] +; SYMS64-NEXT: Name: foo +; SYMS64-NEXT: Value (RelocatableAddress): 0x20 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: [[#INDX+1]] +; SYMS64-NEXT: SectionLen: 24 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 3 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll b/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll --- a/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll +++ b/llvm/test/CodeGen/PowerPC/aix-llvm-intrinsic.ll @@ -9,7 +9,10 @@ ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s ; RUN: llvm-objdump -r -d --symbol-description %t.o | FileCheck --check-prefix=CHECKRELOC %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=CHECKSYM64 %s +; RUN: llvm-objdump -r -d --symbol-description %t64.o | FileCheck --check-prefix=CHECKRELOC64 %s %struct.S = type { i32, i32 } @@ -75,3 +78,44 @@ ; CHECKRELOC-NEXT: 14: 7c 85 23 78 mr 5, 4 ; CHECKRELOC-NEXT: 18: 4b ff ff e9 bl 0x0 ; CHECKRELOC-NEXT: 00000018: R_RBR (idx: 1) .memset[PR] + +; CHECKSYM64: Symbol { +; CHECKSYM64-NEXT: Index: 0 +; CHECKSYM64-NEXT: Name: .file +; CHECKSYM64-NEXT: Value (SymbolTableIndex): 0x0 +; CHECKSYM64-NEXT: Section: N_DEBUG +; CHECKSYM64-NEXT: Source Language ID: TB_C (0x0) +; CHECKSYM64-NEXT: CPU Version ID: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_FILE (0x67) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 0 +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 1 +; CHECKSYM64-NEXT: Name: .memset +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: N_UNDEF +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 2 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_ER (0x0) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } + +; CHECKRELOC64: 0000000000000000 (idx: 7) .bar: +; CHECKRELOC64-NEXT: 0: 7c 08 02 a6 mflr 0 +; CHECKRELOC64-NEXT: 4: f8 01 00 10 std 0, 16(1) +; CHECKRELOC64-NEXT: 8: f8 21 ff 91 stdu 1, -112(1) +; CHECKRELOC64-NEXT: c: e8 62 00 00 ld 3, 0(2) +; CHECKRELOC64-NEXT: 000000000000000e: R_TOC (idx: 13) s[TC] +; CHECKRELOC64-NEXT: 10: 80 83 00 04 lwz 4, 4(3) +; CHECKRELOC64-NEXT: 14: 7c 85 23 78 mr 5, 4 +; CHECKRELOC64-NEXT: 18: 4b ff ff e9 bl 0x0 <.bar> +; CHECKRELOC64-NEXT: 0000000000000018: R_RBR (idx: 1) .memset[PR] diff --git a/llvm/test/CodeGen/PowerPC/aix-return55.ll b/llvm/test/CodeGen/PowerPC/aix-return55.ll --- a/llvm/test/CodeGen/PowerPC/aix-return55.ll +++ b/llvm/test/CodeGen/PowerPC/aix-return55.ll @@ -5,7 +5,11 @@ ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=CHECKOBJ %s ; RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=CHECKSECT %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mcpu=pwr4 -mattr=-altivec -mtriple=powerpc64-ibm-aix-xcoff \ +; RUN: -verify-machineinstrs -data-sections=false -xcoff-traceback-table=false \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-objdump -D %t64.o | FileCheck --check-prefix=CHECKOBJ64 %s +; RUN: llvm-readobj -S %t64.o | FileCheck --check-prefix=CHECKSECT64 %s @a = global i64 320255973571806, align 8 @d = global double 5.000000e+00, align 8 @@ -66,3 +70,50 @@ ;CHECKSECT-NEXT: Type: STYP_DATA (0x40) ;CHECKSECT-NEXT: } ;CHECKSECT-NEXT: ] + +;CHECKOBJ64: 0000000000000000 <.foo>: +;CHECKOBJ64-NEXT: 0: 38 60 00 37 li 3, 55 +;CHECKOBJ64-NEXT: 4: 4e 80 00 20 blr +;CHECKOBJ64: 0000000000000008 <.rodata.str1.1>: +;CHECKOBJ64-NEXT: 8: 68 65 6c 6c xori 5, 3, 27756 +;CHECKOBJ64-NEXT: c: 6f 77 6f 72 xoris 23, 27, 28530 +;CHECKOBJ64-NEXT: 10: 0a 00 00 00 tdlti 0, 0 +;CHECKOBJ64: Disassembly of section .data: +;CHECKOBJ64: 0000000000000018 : +;CHECKOBJ64-NEXT: 18: 00 01 23 45 +;CHECKOBJ64-NEXT: 1c: 67 8a bc de oris 10, 28, 48350 +;CHECKOBJ64: 0000000000000020 : +;CHECKOBJ64-NEXT: 20: 40 14 00 00 bdnzf 20, 0x20 +;CHECKOBJ64-NEXT: 24: 00 00 00 00 +;CHECKOBJ64: 0000000000000028 : +;CHECKOBJ64-NEXT: ... +;CHECKOBJ64-NEXT: 34: 00 00 00 40 + +;CHECKSECT64: Sections [ +;CHECKSECT64-NEXT: Section { +;CHECKSECT64-NEXT: Index: 1 +;CHECKSECT64-NEXT: Name: .text +;CHECKSECT64-NEXT: PhysicalAddress: 0x0 +;CHECKSECT64-NEXT: VirtualAddress: 0x0 +;CHECKSECT64-NEXT: Size: 0x14 +;CHECKSECT64-NEXT: RawDataOffset: 0xA8 +;CHECKSECT64-NEXT: RelocationPointer: 0x0 +;CHECKSECT64-NEXT: LineNumberPointer: 0x0 +;CHECKSECT64-NEXT: NumberOfRelocations: 0 +;CHECKSECT64-NEXT: NumberOfLineNumbers: 0 +;CHECKSECT64-NEXT: Type: STYP_TEXT (0x20) +;CHECKSECT64-NEXT: } +;CHECKSECT64-NEXT: Section { +;CHECKSECT64-NEXT: Index: 2 +;CHECKSECT64-NEXT: Name: .data +;CHECKSECT64-NEXT: PhysicalAddress: 0x18 +;CHECKSECT64-NEXT: VirtualAddress: 0x18 +;CHECKSECT64-NEXT: Size: 0x28 +;CHECKSECT64-NEXT: RawDataOffset: 0xBC +;CHECKSECT64-NEXT: RelocationPointer: 0xE4 +;CHECKSECT64-NEXT: LineNumberPointer: 0x0 +;CHECKSECT64-NEXT: NumberOfRelocations: 2 +;CHECKSECT64-NEXT: NumberOfLineNumbers: 0 +;CHECKSECT64-NEXT: Type: STYP_DATA (0x40) +;CHECKSECT64-NEXT: } +;CHECKSECT64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-weak.ll b/llvm/test/CodeGen/PowerPC/aix-weak.ll --- a/llvm/test/CodeGen/PowerPC/aix-weak.ll +++ b/llvm/test/CodeGen/PowerPC/aix-weak.ll @@ -8,7 +8,9 @@ ; RUN: -mattr=-altivec -data-sections=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=CHECKSYM %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -xcoff-traceback-table=false -mcpu=pwr4 \ +; RUN: -mattr=-altivec -data-sections=false -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=CHECKSYM64 %s @foo_weak_p = global void (...)* bitcast (void ()* @foo_ref_weak to void (...)*), align 4 @b = weak global i32 0, align 4 @@ -368,3 +370,263 @@ ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: } ; CHECKSYM-NEXT: ] + +; CHECKSYM64: Symbols [ +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 0 +; CHECKSYM64-NEXT: Name: .file +; CHECKSYM64-NEXT: Value (SymbolTableIndex): 0x0 +; CHECKSYM64-NEXT: Section: N_DEBUG +; CHECKSYM64-NEXT: Source Language ID: TB_C (0x0) +; CHECKSYM64-NEXT: CPU Version ID: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_FILE (0x67) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 0 +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 1 +; CHECKSYM64-NEXT: Name: .text +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 2 +; CHECKSYM64-NEXT: SectionLen: 136 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 3 +; CHECKSYM64-NEXT: Name: .foo_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 4 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 1 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 5 +; CHECKSYM64-NEXT: Name: .foo_ref_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x20 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 6 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 1 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 7 +; CHECKSYM64-NEXT: Name: .main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x30 +; CHECKSYM64-NEXT: Section: .text +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 8 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 1 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 9 +; CHECKSYM64-NEXT: Name: .data +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x88 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 10 +; CHECKSYM64-NEXT: SectionLen: 12 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 11 +; CHECKSYM64-NEXT: Name: foo_weak_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x88 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 12 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 9 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 13 +; CHECKSYM64-NEXT: Name: b +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x90 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 14 +; CHECKSYM64-NEXT: ContainingCsectSymbolIndex: 9 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM64-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 15 +; CHECKSYM64-NEXT: Name: foo_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0x98 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 16 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 17 +; CHECKSYM64-NEXT: Name: foo_ref_weak +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xB0 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_WEAKEXT (0x6F) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 18 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 19 +; CHECKSYM64-NEXT: Name: main +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xC8 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 20 +; CHECKSYM64-NEXT: SectionLen: 24 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 21 +; CHECKSYM64-NEXT: Name: TOC +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE0 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 22 +; CHECKSYM64-NEXT: SectionLen: 0 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC0 (0xF) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 23 +; CHECKSYM64-NEXT: Name: foo_weak_p +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE0 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 24 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: Symbol { +; CHECKSYM64-NEXT: Index: 25 +; CHECKSYM64-NEXT: Name: b +; CHECKSYM64-NEXT: Value (RelocatableAddress): 0xE8 +; CHECKSYM64-NEXT: Section: .data +; CHECKSYM64-NEXT: Type: 0x0 +; CHECKSYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM64-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM64-NEXT: CSECT Auxiliary Entry { +; CHECKSYM64-NEXT: Index: 26 +; CHECKSYM64-NEXT: SectionLen: 8 +; CHECKSYM64-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM64-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM64-NEXT: SymbolAlignmentLog2: 3 +; CHECKSYM64-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; CHECKSYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: } +; CHECKSYM64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data-only-notoc.ll @@ -4,7 +4,8 @@ ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS %s @a = external global i32, align 4 @b = external global i64, align 8 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-data.ll @@ -9,10 +9,10 @@ ; RUN: FileCheck --check-prefix=OBJ %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. ; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t64.o < %s ; RUN: llvm-readobj --section-headers --file-header %t64.o | \ ; RUN: FileCheck --check-prefix=OBJ64 %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS64 %s @ivar = local_unnamed_addr global i32 35, align 4 @llvar = local_unnamed_addr global i64 36, align 8 @@ -691,7 +691,7 @@ ; OBJ64-NEXT: NumberOfSections: 3 ; OBJ64-NEXT: TimeStamp: None (0x0) ; OBJ64-NEXT: SymbolTableOffset: 0x170 -; OBJ64-NEXT: SymbolTableEntries: 0 +; OBJ64-NEXT: SymbolTableEntries: 45 ; OBJ64-NEXT: OptionalHeaderSize: 0x0 ; OBJ64-NEXT: Flags: 0x0 ; OBJ64-NEXT: } @@ -737,3 +737,434 @@ ; OBJ64-NEXT: Type: STYP_BSS (0x80) ; OBJ64-NEXT: } ; OBJ64-NEXT: ] + +; SYMS64: Symbols [ +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 0 +; SYMS64-NEXT: Name: .file +; SYMS64-NEXT: Value (SymbolTableIndex): 0x0 +; SYMS64-NEXT: Section: N_DEBUG +; SYMS64-NEXT: Source Language ID: TB_C (0x0) +; SYMS64-NEXT: CPU Version ID: 0x0 +; SYMS64-NEXT: StorageClass: C_FILE (0x67) +; SYMS64-NEXT: NumberOfAuxEntries: 0 +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 1 +; SYMS64-NEXT: Name: .text +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 2 +; SYMS64-NEXT: SectionLen: 0 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 3 +; SYMS64-NEXT: Name: .data +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 4 +; SYMS64-NEXT: SectionLen: 128 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 5 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 5 +; SYMS64-NEXT: Name: ivar +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 6 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 7 +; SYMS64-NEXT: Name: llvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x8 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 8 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 9 +; SYMS64-NEXT: Name: svar +; SYMS64-NEXT: Value (RelocatableAddress): 0x10 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 10 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 11 +; SYMS64-NEXT: Name: fvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x14 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 12 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 13 +; SYMS64-NEXT: Name: dvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x18 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 14 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 15 +; SYMS64-NEXT: Name: over_aligned +; SYMS64-NEXT: Value (RelocatableAddress): 0x20 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 16 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 17 +; SYMS64-NEXT: Name: chrarray +; SYMS64-NEXT: Value (RelocatableAddress): 0x28 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 18 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 19 +; SYMS64-NEXT: Name: dblarr +; SYMS64-NEXT: Value (RelocatableAddress): 0x30 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 20 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 21 +; SYMS64-NEXT: Name: d_0 +; SYMS64-NEXT: Value (RelocatableAddress): 0x50 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 22 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 23 +; SYMS64-NEXT: Name: s_0 +; SYMS64-NEXT: Value (RelocatableAddress): 0x58 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 24 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 25 +; SYMS64-NEXT: Name: f_0 +; SYMS64-NEXT: Value (RelocatableAddress): 0x5C +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 26 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 27 +; SYMS64-NEXT: Name: astruct +; SYMS64-NEXT: Value (RelocatableAddress): 0x60 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 28 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 29 +; SYMS64-NEXT: Name: bstruct +; SYMS64-NEXT: Value (RelocatableAddress): 0x70 +; SYMS64-NEXT: Section: .data +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 30 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 31 +; SYMS64-NEXT: Name: a +; SYMS64-NEXT: Value (RelocatableAddress): 0x80 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 32 +; SYMS64-NEXT: SectionLen: 4 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 33 +; SYMS64-NEXT: Name: b +; SYMS64-NEXT: Value (RelocatableAddress): 0x88 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 34 +; SYMS64-NEXT: SectionLen: 8 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 3 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 35 +; SYMS64-NEXT: Name: c +; SYMS64-NEXT: Value (RelocatableAddress): 0x90 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 36 +; SYMS64-NEXT: SectionLen: 2 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 1 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 37 +; SYMS64-NEXT: Name: d +; SYMS64-NEXT: Value (RelocatableAddress): 0x98 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 38 +; SYMS64-NEXT: SectionLen: 8 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 3 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 39 +; SYMS64-NEXT: Name: f +; SYMS64-NEXT: Value (RelocatableAddress): 0xA0 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 40 +; SYMS64-NEXT: SectionLen: 4 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 41 +; SYMS64-NEXT: Name: over_aligned_comm +; SYMS64-NEXT: Value (RelocatableAddress): 0xC0 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 42 +; SYMS64-NEXT: SectionLen: 8 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 5 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 43 +; SYMS64-NEXT: Name: array +; SYMS64-NEXT: Value (RelocatableAddress): 0xC8 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 44 +; SYMS64-NEXT: SectionLen: 33 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-externL.ll @@ -5,10 +5,11 @@ ; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff -mcpu=pwr4 \ ; RUN: -mattr=-altivec -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --symbols %t.o | \ -; RUN: FileCheck --check-prefix=XCOFF32 %s +; RUN: llvm-readobj --symbols %t.o | FileCheck --check-prefix=XCOFF32 %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff -mcpu=pwr4 \ +; RUN: -mattr=-altivec -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --symbols %t64.o | FileCheck --check-prefix=XCOFF64 %s @La = external global i32, align 4 @@ -59,3 +60,40 @@ ; XCOFF32-NEXT: StabSectNum: 0x0 ; XCOFF32-NEXT: } ; XCOFF32-NEXT: } + +; XCOFF64: Index: [[#IND:]]{{.*}}{{[[:space:]] *}}Name: .Lb +; XCOFF64-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF64-NEXT: Section: N_UNDEF +; XCOFF64-NEXT: Type: 0x0 +; XCOFF64-NEXT: StorageClass: C_EXT (0x2) +; XCOFF64-NEXT: NumberOfAuxEntries: 1 +; XCOFF64-NEXT: CSECT Auxiliary Entry { +; XCOFF64-NEXT: Index: 2 +; XCOFF64-NEXT: SectionLen: 0 +; XCOFF64-NEXT: ParameterHashIndex: 0x0 +; XCOFF64-NEXT: TypeChkSectNum: 0x0 +; XCOFF64-NEXT: SymbolAlignmentLog2: 0 +; XCOFF64-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF64-NEXT: StorageMappingClass: XMC_PR (0x0) +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF64-NEXT: } +; XCOFF64-NEXT: } +; XCOFF64-NEXT: Symbol { +; XCOFF64-NEXT: Index: 3 +; XCOFF64-NEXT: Name: La +; XCOFF64-NEXT: Value (RelocatableAddress): 0x0 +; XCOFF64-NEXT: Section: N_UNDEF +; XCOFF64-NEXT: Type: 0x0 +; XCOFF64-NEXT: StorageClass: C_EXT (0x2) +; XCOFF64-NEXT: NumberOfAuxEntries: 1 +; XCOFF64-NEXT: CSECT Auxiliary Entry { +; XCOFF64-NEXT: Index: 4 +; XCOFF64-NEXT: SectionLen: 0 +; XCOFF64-NEXT: ParameterHashIndex: 0x0 +; XCOFF64-NEXT: TypeChkSectNum: 0x0 +; XCOFF64-NEXT: SymbolAlignmentLog2: 0 +; XCOFF64-NEXT: SymbolType: XTY_ER (0x0) +; XCOFF64-NEXT: StorageMappingClass: XMC_UA (0x4) +; XCOFF64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; XCOFF64-NEXT: } +; XCOFF64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-huge-relocs.ll @@ -20,7 +20,10 @@ ; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t.o %t.ll ; RUN: llvm-readobj --section-headers %t.o | FileCheck --check-prefix=XCOFF32 %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +;; An XCOFF64 file may not contain an overflow section header. +; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -mcpu=pwr4 -mattr=-altivec -filetype=obj -o %t64.o %t.overflow.ll +; RUN: llvm-readobj --section-headers %t64.o | FileCheck --check-prefix=XCOFF64 %s @c = external global i8, align 1 @arr = global [SIZE x i8*] [MACRO], align 8 @@ -41,3 +44,16 @@ ; XCOFF32-NEXT: } ; XCOFF32-NOT: Name: .ovrflo ; XCOFF32-NOT: Type: STYP_OVRFLO + +; XCOFF64: Section { +; XCOFF64: Name: .data +; XCOFF64-NEXT: PhysicalAddress: 0x0 +; XCOFF64-NEXT: VirtualAddress: 0x0 +; XCOFF64-NEXT: Size: 0x7FFF8 +; XCOFF64-NEXT: RawDataOffset: 0xA8 +; XCOFF64-NEXT: RelocationPointer: 0x800A0 +; XCOFF64-NEXT: LineNumberPointer: 0x0 +; XCOFF64-NEXT: NumberOfRelocations: 65535 +; XCOFF64-NEXT: NumberOfLineNumbers: 0 +; XCOFF64-NEXT: Type: STYP_DATA (0x40) +; XCOFF64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-lcomm.ll @@ -6,7 +6,10 @@ ; RUN: FileCheck --check-prefix=OBJ %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --section-headers --file-header %t64.o | \ +; RUN: FileCheck --check-prefix=OBJ64 %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS64 %s @a = internal global i32 0, align 4 @b = internal global i64 0, align 8 @@ -108,3 +111,135 @@ ; SYMS-NEXT: } ; SYMS-NEXT: } ; SYMS-NEXT: ] + +; OBJ64: FileHeader { +; OBJ64-NEXT: Magic: 0x1DF +; OBJ64-NEXT: NumberOfSections: 2 +; OBJ64-NEXT: TimeStamp: None (0x0) +; OBJ64-NEXT: SymbolTableOffset: 0x64 +; OBJ64-NEXT: SymbolTableEntries: 9 +; OBJ64-NEXT: OptionalHeaderSize: 0x0 +; OBJ64-NEXT: Flags: 0x0 +; OBJ64-NEXT: } + +; OBJ64: Sections [ +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: 1 +; OBJ64-NEXT: Name: .text +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x0 +; OBJ64-NEXT: RawDataOffset: 0x64 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_TEXT (0x20) +; OBJ64-NEXT: } +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: 2 +; OBJ64-NEXT: Name: .bss +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x14 +; OBJ64-NEXT: RawDataOffset: 0x0 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_BSS (0x80) +; OBJ64-NEXT: } +; OBJ64-NEXT: ] + +; SYMS64: Symbols [ +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 0 +; SYMS64-NEXT: Name: .file +; SYMS64-NEXT: Value (SymbolTableIndex): 0x0 +; SYMS64-NEXT: Section: N_DEBUG +; SYMS64-NEXT: Source Language ID: TB_C (0x0) +; SYMS64-NEXT: CPU Version ID: 0x0 +; SYMS64-NEXT: StorageClass: C_FILE (0x67) +; SYMS64-NEXT: NumberOfAuxEntries: 0 +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 1 +; SYMS64-NEXT: Name: .text +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 2 +; SYMS64-NEXT: SectionLen: 0 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYMS64-NEXT: StabInfoIndex: 0x0 +; SYMS64-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 3 +; SYMS64-NEXT: Name: a +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 4 +; SYMS64-NEXT: SectionLen: 4 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS64-NEXT: StabInfoIndex: 0x0 +; SYMS64-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 5 +; SYMS64-NEXT: Name: b +; SYMS64-NEXT: Value (RelocatableAddress): 0x8 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 6 +; SYMS64-NEXT: SectionLen: 8 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 3 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS64-NEXT: StabInfoIndex: 0x0 +; SYMS64-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 7 +; SYMS64-NEXT: Name: c +; SYMS64-NEXT: Value (RelocatableAddress): 0x10 +; SYMS64-NEXT: Section: .bss +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 8 +; SYMS64-NEXT: SectionLen: 2 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 1 +; SYMS64-NEXT: SymbolType: XTY_CM (0x3) +; SYMS64-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYMS64-NEXT: StabInfoIndex: 0x0 +; SYMS64-NEXT: StabSectNum: 0x0 +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-lower-comm.ll @@ -3,10 +3,13 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \ ; RUN: FileCheck --check-prefixes=CHECK,ASM64 %s -; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -data-sections=false \ +; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj -r --expand-relocs --syms %t.o | FileCheck --check-prefixes=RELOC,SYM %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj -r --expand-relocs --syms %t64.o | FileCheck --check-prefixes=RELOC64,SYM64 %s @common = common global i32 0, align 4 @pointer = global i32* @common, align 4 @@ -94,3 +97,72 @@ ; SYM-NEXT: StabSectNum: 0x0 ; SYM-NEXT: } ; SYM-NEXT: } + +; RELOC64: Relocations [ +; RELOC64-NEXT: Section (index: 2) .data { +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x0 +; RELOC64-NEXT: Symbol: common (7) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: } +; RELOC64-NEXT: ] + +; SYM64: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .data +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: [[#INDX+1]] +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: [[#INDX+2]] +; SYM64-NEXT: Name: pointer +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: [[#INDX+3]] +; SYM64-NEXT: ContainingCsectSymbolIndex: 3 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: [[#INDX+4]] +; SYM64-NEXT: Name: common +; SYM64-NEXT: Value (RelocatableAddress): 0x8 +; SYM64-NEXT: Section: .bss +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: [[#INDX+5]] +; SYM64-NEXT: SectionLen: 4 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolType: XTY_CM (0x3) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-reloc.ll @@ -1,13 +1,18 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -mattr=-altivec \ ; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t.o < %s -; RUN: llvm-readobj --section-headers --file-header %t.o | \ -; RUN: FileCheck --check-prefix=OBJ %s +; RUN: llvm-readobj --section-headers --file-header %t.o | FileCheck --check-prefix=OBJ %s ; RUN: llvm-readobj --relocs --expand-relocs %t.o | FileCheck --check-prefix=RELOC %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s ; RUN: llvm-objdump -r %t.o | FileCheck --check-prefix=DIS_REL %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff -mattr=-altivec \ +; RUN: -xcoff-traceback-table=false -data-sections=false -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --section-headers --file-header %t64.o | FileCheck --check-prefix=OBJ64 %s +; RUN: llvm-readobj --relocs --expand-relocs %t64.o | FileCheck --check-prefix=RELOC64 %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYM64 %s +; RUN: llvm-objdump -D %t64.o | FileCheck --check-prefix=DIS64 %s +; RUN: llvm-objdump -r %t64.o | FileCheck --check-prefix=DIS_REL64 %s @globalA = global i32 1, align 4 @globalB = global i32 2, align 4 @@ -470,3 +475,428 @@ ; DIS_REL-NEXT: 00000038 R_POS TOC ; DIS_REL-NEXT: 00000040 R_POS globalA ; DIS_REL-NEXT: 00000044 R_POS globalB + +; OBJ64: AddressSize: 64bit +; OBJ64-NEXT: FileHeader { +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ64-NEXT: NumberOfSections: 2 +; OBJ64-NEXT: TimeStamp: None (0x0) +; OBJ64-NEXT: SymbolTableOffset: 0x1B8 +; OBJ64-NEXT: SymbolTableEntries: 27 +; OBJ64-NEXT: OptionalHeaderSize: 0x0 +; OBJ64-NEXT: Flags: 0x0 +; OBJ64-NEXT: } +; OBJ64-NEXT: Sections [ +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: 1 +; OBJ64-NEXT: Name: .text +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x40 +; OBJ64-NEXT: RawDataOffset: 0xA8 +; OBJ64-NEXT: RelocationPointer: 0x148 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 3 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_TEXT (0x20) +; OBJ64-NEXT: } +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: 2 +; OBJ64-NEXT: Name: .data +; OBJ64-NEXT: PhysicalAddress: 0x40 +; OBJ64-NEXT: VirtualAddress: 0x40 +; OBJ64-NEXT: Size: 0x60 +; OBJ64-NEXT: RawDataOffset: 0xE8 +; OBJ64-NEXT: RelocationPointer: 0x172 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 5 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_DATA (0x40) +; OBJ64-NEXT: } +; OBJ64-NEXT: ] + +; RELOC64: Relocations [ +; RELOC64-NEXT: Section (index: 1) .text { +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x10 +; RELOC64-NEXT: Symbol: .bar (1) +; RELOC64-NEXT: IsSigned: Yes +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 26 +; RELOC64-NEXT: Type: R_RBR (0x1A) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x1A +; RELOC64-NEXT: Symbol: globalA (23) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 16 +; RELOC64-NEXT: Type: R_TOC (0x3) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x1E +; RELOC64-NEXT: Symbol: globalB (25) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 16 +; RELOC64-NEXT: Type: R_TOC (0x3) +; RELOC64-NEXT: } +; RELOC64-NEXT: } +; RELOC64-NEXT: Section (index: 2) .data { +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x70 +; RELOC64-NEXT: Symbol: arr (15) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x78 +; RELOC64-NEXT: Symbol: .foo (7) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x80 +; RELOC64-NEXT: Symbol: TOC (21) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x90 +; RELOC64-NEXT: Symbol: globalA (11) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: Relocation { +; RELOC64-NEXT: Virtual Address: 0x98 +; RELOC64-NEXT: Symbol: globalB (13) +; RELOC64-NEXT: IsSigned: No +; RELOC64-NEXT: FixupBitValue: 0 +; RELOC64-NEXT: Length: 64 +; RELOC64-NEXT: Type: R_POS (0x0) +; RELOC64-NEXT: } +; RELOC64-NEXT: } +; RELOC64-NEXT: ] + +; SYM64: Symbols [ +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 0 +; SYM64-NEXT: Name: .file +; SYM64-NEXT: Value (SymbolTableIndex): 0x0 +; SYM64-NEXT: Section: N_DEBUG +; SYM64-NEXT: Source Language ID: TB_C (0x0) +; SYM64-NEXT: CPU Version ID: 0x0 +; SYM64-NEXT: StorageClass: C_FILE (0x67) +; SYM64-NEXT: NumberOfAuxEntries: 0 +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 1 +; SYM64-NEXT: Name: .bar +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 2 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 3 +; SYM64-NEXT: Name: bar +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 4 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 5 +; SYM64-NEXT: Name: .text +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 6 +; SYM64-NEXT: SectionLen: 64 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 4 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 7 +; SYM64-NEXT: Name: .foo +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 8 +; SYM64-NEXT: ContainingCsectSymbolIndex: 5 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 9 +; SYM64-NEXT: Name: .data +; SYM64-NEXT: Value (RelocatableAddress): 0x40 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 10 +; SYM64-NEXT: SectionLen: 56 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 11 +; SYM64-NEXT: Name: globalA +; SYM64-NEXT: Value (RelocatableAddress): 0x40 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 12 +; SYM64-NEXT: ContainingCsectSymbolIndex: 9 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 13 +; SYM64-NEXT: Name: globalB +; SYM64-NEXT: Value (RelocatableAddress): 0x44 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 14 +; SYM64-NEXT: ContainingCsectSymbolIndex: 9 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 15 +; SYM64-NEXT: Name: arr +; SYM64-NEXT: Value (RelocatableAddress): 0x48 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 16 +; SYM64-NEXT: ContainingCsectSymbolIndex: 9 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 17 +; SYM64-NEXT: Name: p +; SYM64-NEXT: Value (RelocatableAddress): 0x70 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 18 +; SYM64-NEXT: ContainingCsectSymbolIndex: 9 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 19 +; SYM64-NEXT: Name: foo +; SYM64-NEXT: Value (RelocatableAddress): 0x78 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 20 +; SYM64-NEXT: SectionLen: 24 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 21 +; SYM64-NEXT: Name: TOC +; SYM64-NEXT: Value (RelocatableAddress): 0x90 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 22 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC0 (0xF) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 23 +; SYM64-NEXT: Name: globalA +; SYM64-NEXT: Value (RelocatableAddress): 0x90 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 24 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 25 +; SYM64-NEXT: Name: globalB +; SYM64-NEXT: Value (RelocatableAddress): 0x98 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 26 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: ] + +; DIS64: Disassembly of section .text: +; DIS64: 0000000000000000 <.foo>: +; DIS64-NEXT: 0: 7c 08 02 a6 mflr 0 +; DIS64-NEXT: 4: f8 01 00 10 std 0, 16(1) +; DIS64-NEXT: 8: f8 21 ff 91 stdu 1, -112(1) +; DIS64-NEXT: c: 38 60 00 01 li 3, 1 +; DIS64-NEXT: 10: 4b ff ff f1 bl 0x0 <.foo> +; DIS64-NEXT: 14: 60 00 00 00 nop +; DIS64-NEXT: 18: e8 82 00 00 ld 4, 0(2) +; DIS64-NEXT: 1c: e8 a2 00 08 ld 5, 8(2) +; DIS64-NEXT: 20: 80 84 00 00 lwz 4, 0(4) +; DIS64-NEXT: 24: 80 a5 00 00 lwz 5, 0(5) +; DIS64-NEXT: 28: 7c 63 22 14 add 3, 3, 4 +; DIS64-NEXT: 2c: 7c 63 2a 14 add 3, 3, 5 +; DIS64-NEXT: 30: 38 21 00 70 addi 1, 1, 112 +; DIS64-NEXT: 34: e8 01 00 10 ld 0, 16(1) +; DIS64-NEXT: 38: 7c 08 03 a6 mtlr 0 +; DIS64-NEXT: 3c: 4e 80 00 20 blr + +; DIS64: Disassembly of section .data: +; DIS64: 0000000000000040 : +; DIS64-NEXT: 40: 00 00 00 01 +; DIS64: 0000000000000044 : +; DIS64-NEXT: 44: 00 00 00 02 +; DIS64: 0000000000000048 : +; DIS64-NEXT: 48: 00 00 00 03 +; DIS64-NEXT: ... +; DIS64: 0000000000000070

: +; DIS64-NEXT: 70: 00 00 00 00 +; DIS64-NEXT: 74: 00 00 00 58 +; DIS64: 0000000000000078 : +; DIS64-NEXT: ... +; DIS64-NEXT: 84: 00 00 00 90 +; DIS64-NEXT: ... +; DIS64: 0000000000000090 : +; DIS64-NEXT: 90: 00 00 00 00 +; DIS64-NEXT: 94: 00 00 00 40 +; DIS64: 0000000000000098 : +; DIS64-NEXT: 98: 00 00 00 00 +; DIS64-NEXT: 9c: 00 00 00 44 + +; DIS_REL64: RELOCATION RECORDS FOR [.text]: +; DIS_REL64-NEXT: OFFSET TYPE VALUE +; DIS_REL64-NEXT: 0000000000000010 R_RBR .bar +; DIS_REL64-NEXT: 000000000000001a R_TOC globalA +; DIS_REL64-NEXT: 000000000000001e R_TOC globalB + +; DIS_REL64: RELOCATION RECORDS FOR [.data]: +; DIS_REL64-NEXT: OFFSET TYPE VALUE +; DIS_REL64-NEXT: 0000000000000030 R_POS arr +; DIS_REL64-NEXT: 0000000000000038 R_POS .foo +; DIS_REL64-NEXT: 0000000000000040 R_POS TOC +; DIS_REL64-NEXT: 0000000000000050 R_POS globalA +; DIS_REL64-NEXT: 0000000000000058 R_POS globalB diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-rodata.ll @@ -3,13 +3,18 @@ ; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false < %s | \ ; RUN: FileCheck --check-prefixes=CHECK,CHECK64 %s -; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false -filetype=obj -o %t.o < %s +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc-ibm-aix-xcoff -data-sections=false \ +; RUN: -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --section-headers --file-header %t.o | \ ; RUN: FileCheck --check-prefix=OBJ %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYMS %s ; RUN: llvm-objdump -D %t.o | FileCheck --check-prefix=DIS %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mcpu=pwr7 -mtriple powerpc64-ibm-aix-xcoff -data-sections=false \ +; RUN: -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --section-headers --file-header %t64.o | \ +; RUN: FileCheck --check-prefix=OBJ64 %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYMS64 %s @const_ivar = constant i32 35, align 4 @const_llvar = constant i64 36, align 8 @@ -331,3 +336,232 @@ ; DIS-NEXT: 44: 00 00 00 00 ; DIS-NEXT: 48: 40 10 00 00 ; DIS-NEXT: 4c: 00 00 00 00 + +; OBJ64: FileHeader { +; OBJ64-NEXT: Magic: 0x1F7 +; OBJ64-NEXT: NumberOfSections: 1 +; OBJ64-NEXT: TimeStamp: None (0x0) +; OBJ64-NEXT: SymbolTableOffset: 0xB0 +; OBJ64-NEXT: SymbolTableEntries: 21 +; OBJ64-NEXT: OptionalHeaderSize: 0x0 +; OBJ64-NEXT: Flags: 0x0 +; OBJ64-NEXT: } + +; OBJ64: Sections [ +; OBJ64-NEXT: Section { +; OBJ64-NEXT: Index: 1 +; OBJ64-NEXT: Name: .text +; OBJ64-NEXT: PhysicalAddress: 0x0 +; OBJ64-NEXT: VirtualAddress: 0x0 +; OBJ64-NEXT: Size: 0x50 +; OBJ64-NEXT: RawDataOffset: 0x60 +; OBJ64-NEXT: RelocationPointer: 0x0 +; OBJ64-NEXT: LineNumberPointer: 0x0 +; OBJ64-NEXT: NumberOfRelocations: 0 +; OBJ64-NEXT: NumberOfLineNumbers: 0 +; OBJ64-NEXT: Type: STYP_TEXT (0x20) +; OBJ64-NEXT: } +; OBJ64-NEXT: ] + +; SYMS64: Symbols [ +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 0 +; SYMS64-NEXT: Name: .file +; SYMS64-NEXT: Value (SymbolTableIndex): 0x0 +; SYMS64-NEXT: Section: N_DEBUG +; SYMS64-NEXT: Source Language ID: TB_C (0x0) +; SYMS64-NEXT: CPU Version ID: 0x0 +; SYMS64-NEXT: StorageClass: C_FILE (0x67) +; SYMS64-NEXT: NumberOfAuxEntries: 0 +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 1 +; SYMS64-NEXT: Name: .text +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 2 +; SYMS64-NEXT: SectionLen: 0 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 2 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 3 +; SYMS64-NEXT: Name: .rodata +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 4 +; SYMS64-NEXT: SectionLen: 80 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 5 +; SYMS64-NEXT: SymbolType: XTY_SD (0x1) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 5 +; SYMS64-NEXT: Name: const_ivar +; SYMS64-NEXT: Value (RelocatableAddress): 0x0 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 6 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 7 +; SYMS64-NEXT: Name: const_llvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x8 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 8 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 9 +; SYMS64-NEXT: Name: const_svar +; SYMS64-NEXT: Value (RelocatableAddress): 0x10 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 10 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 11 +; SYMS64-NEXT: Name: const_fvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x14 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 12 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 13 +; SYMS64-NEXT: Name: const_dvar +; SYMS64-NEXT: Value (RelocatableAddress): 0x18 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 14 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 15 +; SYMS64-NEXT: Name: const_over_aligned +; SYMS64-NEXT: Value (RelocatableAddress): 0x20 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 16 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 17 +; SYMS64-NEXT: Name: const_chrarray +; SYMS64-NEXT: Value (RelocatableAddress): 0x28 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 18 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: Symbol { +; SYMS64-NEXT: Index: 19 +; SYMS64-NEXT: Name: const_dblarr +; SYMS64-NEXT: Value (RelocatableAddress): 0x30 +; SYMS64-NEXT: Section: .text +; SYMS64-NEXT: Type: 0x0 +; SYMS64-NEXT: StorageClass: C_EXT (0x2) +; SYMS64-NEXT: NumberOfAuxEntries: 1 +; SYMS64-NEXT: CSECT Auxiliary Entry { +; SYMS64-NEXT: Index: 20 +; SYMS64-NEXT: ContainingCsectSymbolIndex: 3 +; SYMS64-NEXT: ParameterHashIndex: 0x0 +; SYMS64-NEXT: TypeChkSectNum: 0x0 +; SYMS64-NEXT: SymbolAlignmentLog2: 0 +; SYMS64-NEXT: SymbolType: XTY_LD (0x2) +; SYMS64-NEXT: StorageMappingClass: XMC_RO (0x1) +; SYMS64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYMS64-NEXT: } +; SYMS64-NEXT: } +; SYMS64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll --- a/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-toc.ll @@ -9,7 +9,9 @@ ; RUN: --xcoff-traceback-table=false -filetype=obj -o %t.o < %s ; RUN: llvm-readobj --syms %t.o | FileCheck --check-prefix=SYM %s -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mattr=-altivec -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: --xcoff-traceback-table=false -filetype=obj -o %t64.o < %s +; RUN: llvm-readobj --syms %t64.o | FileCheck --check-prefix=SYM64 %s @a = external global i32, align 4 @b = external global i64, align 8 @@ -357,3 +359,453 @@ ; SYM-NEXT: StabSectNum: 0x0 ; SYM-NEXT: } ; SYM-NEXT: } + +; SYM64: Symbols [ +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 0 +; SYM64-NEXT: Name: .file +; SYM64-NEXT: Value (SymbolTableIndex): 0x0 +; SYM64-NEXT: Section: N_DEBUG +; SYM64-NEXT: Source Language ID: TB_C (0x0) +; SYM64-NEXT: CPU Version ID: 0x0 +; SYM64-NEXT: StorageClass: C_FILE (0x67) +; SYM64-NEXT: NumberOfAuxEntries: 0 +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 1 +; SYM64-NEXT: Name: a +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 2 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_UA (0x4) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 3 +; SYM64-NEXT: Name: b +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 4 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_UA (0x4) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 5 +; SYM64-NEXT: Name: c +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 6 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_UA (0x4) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 7 +; SYM64-NEXT: Name: .foo +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 8 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 9 +; SYM64-NEXT: Name: foo +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: N_UNDEF +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 10 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_ER (0x0) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 11 +; SYM64-NEXT: Name: .text +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 12 +; SYM64-NEXT: SectionLen: 116 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 4 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 13 +; SYM64-NEXT: Name: .bar +; SYM64-NEXT: Value (RelocatableAddress): 0x0 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 14 +; SYM64-NEXT: ContainingCsectSymbolIndex: 11 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 15 +; SYM64-NEXT: Name: .bar2 +; SYM64-NEXT: Value (RelocatableAddress): 0x50 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 16 +; SYM64-NEXT: ContainingCsectSymbolIndex: 11 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 17 +; SYM64-NEXT: Name: .foobar +; SYM64-NEXT: Value (RelocatableAddress): 0x70 +; SYM64-NEXT: Section: .text +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 18 +; SYM64-NEXT: ContainingCsectSymbolIndex: 11 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 0 +; SYM64-NEXT: SymbolType: XTY_LD (0x2) +; SYM64-NEXT: StorageMappingClass: XMC_PR (0x0) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 19 +; SYM64-NEXT: Name: bar +; SYM64-NEXT: Value (RelocatableAddress): 0x78 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 20 +; SYM64-NEXT: SectionLen: 24 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 21 +; SYM64-NEXT: Name: bar2 +; SYM64-NEXT: Value (RelocatableAddress): 0x90 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 22 +; SYM64-NEXT: SectionLen: 24 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 23 +; SYM64-NEXT: Name: foobar +; SYM64-NEXT: Value (RelocatableAddress): 0xA8 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 24 +; SYM64-NEXT: SectionLen: 24 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_DS (0xA) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 25 +; SYM64-NEXT: Name: TOC +; SYM64-NEXT: Value (RelocatableAddress): 0xC0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 26 +; SYM64-NEXT: SectionLen: 0 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC0 (0xF) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 27 +; SYM64-NEXT: Name: a +; SYM64-NEXT: Value (RelocatableAddress): 0xC0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 28 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 29 +; SYM64-NEXT: Name: b +; SYM64-NEXT: Value (RelocatableAddress): 0xC8 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 30 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 31 +; SYM64-NEXT: Name: c +; SYM64-NEXT: Value (RelocatableAddress): 0xD0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 32 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 33 +; SYM64-NEXT: Name: globa +; SYM64-NEXT: Value (RelocatableAddress): 0xD8 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 34 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 35 +; SYM64-NEXT: Name: ptr +; SYM64-NEXT: Value (RelocatableAddress): 0xE0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 36 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 37 +; SYM64-NEXT: Name: bar +; SYM64-NEXT: Value (RelocatableAddress): 0xE8 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 38 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 39 +; SYM64-NEXT: Name: foo +; SYM64-NEXT: Value (RelocatableAddress): 0xF0 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 40 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 41 +; SYM64-NEXT: Name: foobar +; SYM64-NEXT: Value (RelocatableAddress): 0xF8 +; SYM64-NEXT: Section: .data +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 42 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 3 +; SYM64-NEXT: SymbolType: XTY_SD (0x1) +; SYM64-NEXT: StorageMappingClass: XMC_TC (0x3) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 43 +; SYM64-NEXT: Name: globa +; SYM64-NEXT: Value (RelocatableAddress): 0x100 +; SYM64-NEXT: Section: .bss +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_EXT (0x2) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 44 +; SYM64-NEXT: SectionLen: 4 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolType: XTY_CM (0x3) +; SYM64-NEXT: StorageMappingClass: XMC_RW (0x5) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: Symbol { +; SYM64-NEXT: Index: 45 +; SYM64-NEXT: Name: ptr +; SYM64-NEXT: Value (RelocatableAddress): 0x104 +; SYM64-NEXT: Section: .bss +; SYM64-NEXT: Type: 0x0 +; SYM64-NEXT: StorageClass: C_HIDEXT (0x6B) +; SYM64-NEXT: NumberOfAuxEntries: 1 +; SYM64-NEXT: CSECT Auxiliary Entry { +; SYM64-NEXT: Index: 46 +; SYM64-NEXT: SectionLen: 8 +; SYM64-NEXT: ParameterHashIndex: 0x0 +; SYM64-NEXT: TypeChkSectNum: 0x0 +; SYM64-NEXT: SymbolAlignmentLog2: 2 +; SYM64-NEXT: SymbolType: XTY_CM (0x3) +; SYM64-NEXT: StorageMappingClass: XMC_BS (0x9) +; SYM64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +; SYM64-NEXT: } +; SYM64-NEXT: } +; SYM64-NEXT: ] diff --git a/llvm/test/CodeGen/PowerPC/basic-toc-data-def.ll b/llvm/test/CodeGen/PowerPC/basic-toc-data-def.ll --- a/llvm/test/CodeGen/PowerPC/basic-toc-data-def.ll +++ b/llvm/test/CodeGen/PowerPC/basic-toc-data-def.ll @@ -3,6 +3,11 @@ ; RUN: -verify-machineinstrs < %s 2>&1 | \ ; RUN: FileCheck %s --check-prefix=OBJ +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s +; RUN: not --crash llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -verify-machineinstrs < %s 2>&1 | \ +; RUN: FileCheck %s --check-prefix=OBJ + @i = global i32 55, align 4 #0 attributes #0 = { "toc-data" } diff --git a/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll b/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll --- a/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll +++ b/llvm/test/CodeGen/PowerPC/basic-toc-data-extern.ll @@ -1,9 +1,12 @@ ; RUN: llc -mtriple powerpc-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s ; RUN: not --crash llc -filetype=obj -mtriple powerpc-ibm-aix-xcoff \ ; RUN: -verify-machineinstrs < %s 2>&1 | \ -; RUN: FileCheck %s --check-prefix=OBJ32 +; RUN: FileCheck %s --check-prefix=OBJ -;; FIXME: currently only fileHeader and sectionHeaders are supported in XCOFF64. +; RUN: llc -mtriple powerpc64-ibm-aix-xcoff -verify-machineinstrs < %s | FileCheck %s +; RUN: not --crash llc -filetype=obj -mtriple powerpc64-ibm-aix-xcoff \ +; RUN: -verify-machineinstrs < %s 2>&1 | \ +; RUN: FileCheck %s --check-prefix=OBJ @i = external global i32, align 4 #0 @@ -17,6 +20,6 @@ ; CHECK: .toc ; CHECK-NEXT: .extern i[TD] -; OBJ32: LLVM ERROR: toc-data not yet supported when writing object files. +; OBJ: LLVM ERROR: toc-data not yet supported when writing object files. attributes #0 = { "toc-data" }