diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h --- a/llvm/include/llvm/MC/MCContext.h +++ b/llvm/include/llvm/MC/MCContext.h @@ -564,8 +564,8 @@ MCSectionXCOFF *getXCOFFSection(StringRef Section, XCOFF::StorageMappingClass MappingClass, - XCOFF::SymbolType CSectType, - SectionKind K, + XCOFF::SymbolType CSectType, SectionKind K, + bool MultiSymbolsAllowed = false, const char *BeginSymName = nullptr); // Create and save a copy of STI and return a reference to the copy. diff --git a/llvm/include/llvm/MC/MCSectionXCOFF.h b/llvm/include/llvm/MC/MCSectionXCOFF.h --- a/llvm/include/llvm/MC/MCSectionXCOFF.h +++ b/llvm/include/llvm/MC/MCSectionXCOFF.h @@ -36,13 +36,16 @@ XCOFF::SymbolType Type; MCSymbolXCOFF *const QualName; StringRef SymbolTableName; + bool MultiSymbolsAllowed; static constexpr unsigned DefaultAlignVal = 4; MCSectionXCOFF(StringRef Name, XCOFF::StorageMappingClass SMC, XCOFF::SymbolType ST, SectionKind K, MCSymbolXCOFF *QualName, - MCSymbol *Begin, StringRef SymbolTableName) + MCSymbol *Begin, StringRef SymbolTableName, + bool MultiSymbolsAllowed) : MCSection(SV_XCOFF, Name, K, Begin), MappingClass(SMC), Type(ST), - QualName(QualName), SymbolTableName(SymbolTableName) { + QualName(QualName), SymbolTableName(SymbolTableName), + MultiSymbolsAllowed(MultiSymbolsAllowed) { assert((ST == XCOFF::XTY_SD || ST == XCOFF::XTY_CM || ST == XCOFF::XTY_ER) && "Invalid or unhandled type for csect."); assert(QualName != nullptr && "QualName is needed."); @@ -75,6 +78,7 @@ bool UseCodeAlign() const override; bool isVirtualSection() const override; StringRef getSymbolTableName() const { return SymbolTableName; } + bool isMultiSymbolsAllowed() const { return MultiSymbolsAllowed; } }; } // end namespace llvm diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -2110,7 +2110,8 @@ return cast( getSectionForFunctionDescriptor(cast(GO), TM)) ->getQualNameSymbol(); - if (TM.getDataSections() || GOKind.isCommon() || GOKind.isBSSLocal()) + if ((TM.getDataSections() && !GO->hasSection()) || GOKind.isCommon() || + GOKind.isBSSLocal()) return cast(SectionForGlobal(GO, GOKind, TM)) ->getQualNameSymbol(); } @@ -2121,7 +2122,22 @@ MCSection *TargetLoweringObjectFileXCOFF::getExplicitSectionGlobal( const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const { - report_fatal_error("XCOFF explicit sections not yet implemented."); + if (!GO->hasSection()) + report_fatal_error("#pragma clang section is not yet supported"); + + StringRef SectionName = GO->getSection(); + XCOFF::StorageMappingClass MappingClass; + if (Kind.isText()) + MappingClass = XCOFF::XMC_PR; + else if (Kind.isData() || Kind.isReadOnlyWithRel() || Kind.isBSS()) + MappingClass = XCOFF::XMC_RW; + else if (Kind.isReadOnly()) + MappingClass = XCOFF::XMC_RO; + else + report_fatal_error("XCOFF other section types not yet implemented."); + + return getContext().getXCOFFSection(SectionName, MappingClass, XCOFF::XTY_SD, + Kind, /* MultiSymbolsAllowed*/ true); } MCSection *TargetLoweringObjectFileXCOFF::getSectionForExternalReference( @@ -2147,7 +2163,7 @@ getNameWithPrefix(Name, GO, TM); return getContext().getXCOFFSection( Name, Kind.isBSSLocal() ? XCOFF::XMC_BS : XCOFF::XMC_RW, XCOFF::XTY_CM, - Kind, /* BeginSymbolName */ nullptr); + Kind); } if (Kind.isMergeableCString()) { @@ -2162,8 +2178,9 @@ if (TM.getDataSections()) getNameWithPrefix(Name, GO, TM); - return getContext().getXCOFFSection(Name, XCOFF::XMC_RO, XCOFF::XTY_SD, - Kind, /*BeginSymbolName*/ nullptr); + return getContext().getXCOFFSection( + Name, XCOFF::XMC_RO, XCOFF::XTY_SD, Kind, + /* MultiSymbolsAllowed*/ !TM.getDataSections()); } if (Kind.isText()) { @@ -2290,21 +2307,22 @@ isa_and_nonnull(cast(Func)->getBaseObject()))) && "Func must be a function or an alias which has a function as base " "object."); + SmallString<128> NameStr; NameStr.push_back('.'); getNameWithPrefix(NameStr, Func, TM); - // When -function-sections is enabled, it's not necessary to emit - // function entry point label any more. We will use function entry - // point csect instead. And for function delcarations, the undefined symbols - // gets treated as csect with XTY_ER property. - if ((TM.getFunctionSections() || Func->isDeclaration()) && + // When -function-sections is enabled and explicit section is not specified, + // it's not necessary to emit function entry point label any more. We will use + // function entry point csect instead. And for function delcarations, the + // undefined symbols gets treated as csect with XTY_ER property. + if (((TM.getFunctionSections() && !Func->hasSection()) || + Func->isDeclaration()) && isa(Func)) { - return cast( - getContext().getXCOFFSection( - NameStr, XCOFF::XMC_PR, - Func->isDeclaration() ? XCOFF::XTY_ER : XCOFF::XTY_SD, - SectionKind::getText())) + return getContext() + .getXCOFFSection(NameStr, XCOFF::XMC_PR, + Func->isDeclaration() ? XCOFF::XTY_ER : XCOFF::XTY_SD, + SectionKind::getText()) ->getQualNameSymbol(); } diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -659,17 +659,21 @@ return Result; } -MCSectionXCOFF *MCContext::getXCOFFSection(StringRef Section, - XCOFF::StorageMappingClass SMC, - XCOFF::SymbolType Type, - SectionKind Kind, - const char *BeginSymName) { +MCSectionXCOFF * +MCContext::getXCOFFSection(StringRef Section, XCOFF::StorageMappingClass SMC, + XCOFF::SymbolType Type, SectionKind Kind, + bool MultiSymbolsAllowed, const char *BeginSymName) { // Do the lookup. If we have a hit, return it. auto IterBool = XCOFFUniquingMap.insert( std::make_pair(XCOFFSectionKey{Section.str(), SMC}, nullptr)); auto &Entry = *IterBool.first; - if (!IterBool.second) - return Entry.second; + if (!IterBool.second) { + MCSectionXCOFF *ExistedEntry = Entry.second; + if (ExistedEntry->isMultiSymbolsAllowed() != MultiSymbolsAllowed) + report_fatal_error("section's multiply symbols policy does not match"); + + return ExistedEntry; + } // Otherwise, return a new section. StringRef CachedName = Entry.first.SectionName; @@ -684,7 +688,7 @@ // CachedName contains invalid character(s) such as '$' for an XCOFF symbol. MCSectionXCOFF *Result = new (XCOFFAllocator.Allocate()) MCSectionXCOFF(QualName->getUnqualifiedName(), SMC, Type, Kind, QualName, - Begin, CachedName); + Begin, CachedName, MultiSymbolsAllowed); Entry.second = Result; auto *F = new MCDataFragment(); diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -864,17 +864,17 @@ // get placed into this csect. The choice of csect name is not a property of // the ABI or object file format. For example, the XL compiler uses an unnamed // csect for program code. - TextSection = - Ctx->getXCOFFSection(".text", XCOFF::StorageMappingClass::XMC_PR, - XCOFF::XTY_SD, SectionKind::getText()); + TextSection = Ctx->getXCOFFSection( + ".text", XCOFF::StorageMappingClass::XMC_PR, XCOFF::XTY_SD, + SectionKind::getText(), /* MultiSymbolsAllowed*/ true); - DataSection = - Ctx->getXCOFFSection(".data", XCOFF::StorageMappingClass::XMC_RW, - XCOFF::XTY_SD, SectionKind::getData()); + DataSection = Ctx->getXCOFFSection( + ".data", XCOFF::StorageMappingClass::XMC_RW, XCOFF::XTY_SD, + SectionKind::getData(), /* MultiSymbolsAllowed*/ true); - ReadOnlySection = - Ctx->getXCOFFSection(".rodata", XCOFF::StorageMappingClass::XMC_RO, - XCOFF::XTY_SD, SectionKind::getReadOnly()); + ReadOnlySection = Ctx->getXCOFFSection( + ".rodata", XCOFF::StorageMappingClass::XMC_RO, XCOFF::XTY_SD, + SectionKind::getReadOnly(), /* MultiSymbolsAllowed*/ true); TOCBaseSection = Ctx->getXCOFFSection("TOC", XCOFF::StorageMappingClass::XMC_TC0, diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp --- a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -1738,9 +1738,6 @@ if (GV->isThreadLocal()) report_fatal_error("Thread local not yet supported on AIX."); - if (GV->hasSection()) - report_fatal_error("Custom section for Data not yet supported."); - if (GV->hasComdat()) report_fatal_error("COMDAT not yet supported by AIX."); } @@ -1811,10 +1808,12 @@ MCSymbol *EmittedInitSym = GVSym; emitLinkage(GV, EmittedInitSym); emitAlignment(getGVAlignment(GV, DL), GV); + // When -fdata-sections is enabled, every GlobalVariable will // be put into its own csect; therefore, label is not necessary here. - if (!TM.getDataSections()) + if (!TM.getDataSections() || GV->hasSection()) { OutStreamer->emitLabel(EmittedInitSym); + } // Emit aliasing label for global variable. llvm::for_each(GOAliasMap[GV], [this](const GlobalAlias *Alias) { diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-error-explicit-data-section.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-error-explicit-data-section.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-error-explicit-data-section.ll @@ -0,0 +1,6 @@ +; RUN: not --crash llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff \ +; RUN: -mcpu=pwr4 -mattr=-altivec < %s 2>&1 | FileCheck %s +; CHECK: LLVM ERROR: section's multiply symbols policy does not match + +@a = global i32 3, section "ab", align 4 +@ab = global i32 5, align 4 diff --git a/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll b/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll new file mode 100644 --- /dev/null +++ b/llvm/test/CodeGen/PowerPC/aix-xcoff-explicit-section.ll @@ -0,0 +1,256 @@ +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff < %s | FileCheck %s +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc64-ibm-aix-xcoff < %s | FileCheck %s +; RUN: llc -verify-machineinstrs -mcpu=pwr4 -mtriple powerpc-ibm-aix-xcoff -filetype=obj -o %t.o < %s +; RUN: llvm-objdump -D --symbol-description %t.o | FileCheck --check-prefix=CHECKOBJ %s +; RUN: llvm-readobj -syms %t.o | FileCheck --check-prefix=CHECKSYM %s + +@ext_const = constant i32 1, section ".ext_const_sec", align 4 +@ext_var = global i32 1, section ".ext_var_sec", align 4 +@ext_zvar = global i32 0, section ".ext_zvar_sec", align 4 + +define dso_local signext i32 @ext_fun() section ".ext_fun_sec" { +entry: + %0 = load i32, i32* @ext_const, align 4 + %1 = load i32, i32* @ext_var, align 4 + %add = add nsw i32 %0, %1 + %2 = load i32, i32* @ext_zvar, align 4 + %add1 = add nsw i32 %add, %2 + ret i32 %add1 +} + +; CHECK: .globl ext_fun[DS] # -- Begin function ext_fun +; CHECK-NEXT: .globl .ext_fun +; CHECK-NEXT: .align 4 +; CHECK-NEXT: .csect ext_fun[DS] +; CHECK: .csect .ext_fun_sec[PR],2 +; CHECK-NEXT: .ext_fun: +; CHECK: .csect .ext_const_sec[RO],2 +; CHECK-NEXT: .globl ext_const +; CHECK-NEXT: .align 2 +; CHECK-NEXT: ext_const: +; CHECK-NEXT: .vbyte 4, 1 # 0x1 +; CHECK-NEXT: .csect .ext_var_sec[RW],2 +; CHECK-NEXT: .globl ext_var +; CHECK-NEXT: .align 2 +; CHECK-NEXT: ext_var: +; CHECK-NEXT: .vbyte 4, 1 # 0x1 +; CHECK-NEXT: .csect .ext_zvar_sec[RW],2 +; CHECK-NEXT: .globl ext_zvar +; CHECK-NEXT: .align 2 +; CHECK-NEXT: ext_zvar: +; CHECK-NEXT: .vbyte 4, 0 # 0x0 +; CHECK-NEXT: .toc +; CHECK-NEXT: L..C0: +; CHECK-NEXT: .tc ext_var[TC],ext_var +; CHECK-NEXT: L..C1: +; CHECK-NEXT: .tc ext_zvar[TC],ext_zvar + +; CHECKOBJ: 00000000 (idx: 4) .ext_fun: +; CHECKOBJ-NEXT: 0: 80 62 00 00 lwz 3, 0(2) +; CHECKOBJ-NEXT: 4: 80 82 00 04 lwz 4, 4(2) +; CHECKOBJ-NEXT: 8: 80 63 00 00 lwz 3, 0(3) +; CHECKOBJ-NEXT: c: 80 84 00 00 lwz 4, 0(4) +; CHECKOBJ-NEXT: 10: 7c 63 22 14 add 3, 3, 4 +; CHECKOBJ-NEXT: 14: 38 63 00 01 addi 3, 3, 1 +; CHECKOBJ-NEXT: 18: 4e 80 00 20 blr +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 0000001c (idx: 8) ext_const: +; CHECKOBJ-NEXT: 1c: 00 00 00 01 +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: Disassembly of section .data: +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 00000020 (idx: 12) ext_var: +; CHECKOBJ-NEXT: 20: 00 00 00 01 +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 00000024 (idx: 16) ext_zvar: +; CHECKOBJ-NEXT: 24: 00 00 00 00 +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 00000028 (idx: 18) ext_fun[DS]: +; CHECKOBJ-NEXT: 28: 00 00 00 00 +; CHECKOBJ-NEXT: 2c: 00 00 00 34 +; CHECKOBJ-NEXT: 30: 00 00 00 00 +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 00000034 (idx: 22) ext_var[TC]: +; CHECKOBJ-NEXT: 34: 00 00 00 20 +; CHECKOBJ-EMPTY: +; CHECKOBJ-NEXT: 00000038 (idx: 24) ext_zvar[TC]: +; CHECKOBJ-NEXT: 38: 00 00 00 24 + +; CHECKSYM: Symbol {{[{][[:space:]] *}}Index: [[#INDX:]]{{[[:space:]] *}}Name: .ext_fun_sec +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM-NEXT: Section: .text +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+1]] +; CHECKSYM-NEXT: SectionLen: 28 +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 4 +; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+2]] +; CHECKSYM-NEXT: Name: .ext_fun +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x0 +; CHECKSYM-NEXT: Section: .text +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+3]] +; CHECKSYM-NEXT: ContainingCsectSymbolIndex: [[#INDX]] +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM-NEXT: StorageMappingClass: XMC_PR (0x0) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+4]] +; CHECKSYM-NEXT: Name: .ext_const_sec +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x1C +; CHECKSYM-NEXT: Section: .text +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+5]] +; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RO (0x1) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+6]] +; CHECKSYM-NEXT: Name: ext_const +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x1C +; CHECKSYM-NEXT: Section: .text +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+7]] +; CHECKSYM-NEXT: ContainingCsectSymbolIndex: [[#INDX+4]] +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RO (0x1) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+8]] +; CHECKSYM-NEXT: Name: .ext_var_sec +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x20 +; CHECKSYM-NEXT: Section: .data +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+9]] +; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+10]] +; CHECKSYM-NEXT: Name: ext_var +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x20 +; CHECKSYM-NEXT: Section: .data +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+11]] +; CHECKSYM-NEXT: ContainingCsectSymbolIndex: [[#INDX+8]] +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+12]] +; CHECKSYM-NEXT: Name: .ext_zvar_sec +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x24 +; CHECKSYM-NEXT: Section: .data +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_HIDEXT (0x6B) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+13]] +; CHECKSYM-NEXT: SectionLen: 4 +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+14]] +; CHECKSYM-NEXT: Name: ext_zvar +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x24 +; CHECKSYM-NEXT: Section: .data +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+15]] +; CHECKSYM-NEXT: ContainingCsectSymbolIndex: [[#INDX+12]] +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 0 +; CHECKSYM-NEXT: SymbolType: XTY_LD (0x2) +; CHECKSYM-NEXT: StorageMappingClass: XMC_RW (0x5) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: Symbol { +; CHECKSYM-NEXT: Index: [[#INDX+16]] +; CHECKSYM-NEXT: Name: ext_fun +; CHECKSYM-NEXT: Value (RelocatableAddress): 0x28 +; CHECKSYM-NEXT: Section: .data +; CHECKSYM-NEXT: Type: 0x0 +; CHECKSYM-NEXT: StorageClass: C_EXT (0x2) +; CHECKSYM-NEXT: NumberOfAuxEntries: 1 +; CHECKSYM-NEXT: CSECT Auxiliary Entry { +; CHECKSYM-NEXT: Index: [[#INDX+17]] +; CHECKSYM-NEXT: SectionLen: 12 +; CHECKSYM-NEXT: ParameterHashIndex: 0x0 +; CHECKSYM-NEXT: TypeChkSectNum: 0x0 +; CHECKSYM-NEXT: SymbolAlignmentLog2: 2 +; CHECKSYM-NEXT: SymbolType: XTY_SD (0x1) +; CHECKSYM-NEXT: StorageMappingClass: XMC_DS (0xA) +; CHECKSYM-NEXT: StabInfoIndex: 0x0 +; CHECKSYM-NEXT: StabSectNum: 0x0 +; CHECKSYM-NEXT: } +; CHECKSYM-NEXT: }