[XCOFF] Enable explicit sections on AIX

Implement mechanism to allow explicit sections to be generated on AIX.

Reviewed By: DiggerLin

Differential Revision: https://reviews.llvm.org/D88615
This commit is contained in:
jasonliu 2020-11-09 15:12:46 +00:00
parent df30bc0168
commit 42d2109380
8 changed files with 327 additions and 40 deletions

View File

@ -564,8 +564,8 @@ namespace llvm {
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.

View File

@ -36,13 +36,16 @@ class MCSectionXCOFF final : public MCSection {
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 @@ public:
bool UseCodeAlign() const override;
bool isVirtualSection() const override;
StringRef getSymbolTableName() const { return SymbolTableName; }
bool isMultiSymbolsAllowed() const { return MultiSymbolsAllowed; }
};
} // end namespace llvm

View File

@ -2110,7 +2110,8 @@ TargetLoweringObjectFileXCOFF::getTargetSymbol(const GlobalValue *GV,
return cast<MCSectionXCOFF>(
getSectionForFunctionDescriptor(cast<Function>(GO), TM))
->getQualNameSymbol();
if (TM.getDataSections() || GOKind.isCommon() || GOKind.isBSSLocal())
if ((TM.getDataSections() && !GO->hasSection()) || GOKind.isCommon() ||
GOKind.isBSSLocal())
return cast<MCSectionXCOFF>(SectionForGlobal(GO, GOKind, TM))
->getQualNameSymbol();
}
@ -2121,7 +2122,22 @@ TargetLoweringObjectFileXCOFF::getTargetSymbol(const GlobalValue *GV,
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 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
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 @@ MCSection *TargetLoweringObjectFileXCOFF::SelectSectionForGlobal(
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 @@ MCSymbol *TargetLoweringObjectFileXCOFF::getFunctionEntryPointSymbol(
isa_and_nonnull<Function>(cast<GlobalAlias>(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<Function>(Func)) {
return cast<MCSectionXCOFF>(
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();
}

View File

@ -659,17 +659,21 @@ MCSectionWasm *MCContext::getWasmSection(const Twine &Section, SectionKind Kind,
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 @@ MCSectionXCOFF *MCContext::getXCOFFSection(StringRef Section,
// 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();

View File

@ -864,17 +864,17 @@ void MCObjectFileInfo::initXCOFFMCObjectFileInfo(const Triple &T) {
// 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,

View File

@ -1738,9 +1738,6 @@ void PPCAIXAsmPrinter::ValidateGV(const GlobalVariable *GV) {
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 @@ void PPCAIXAsmPrinter::emitGlobalVariable(const GlobalVariable *GV) {
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) {

View File

@ -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

View File

@ -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 <unknown>
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: Disassembly of section .data:
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: 00000020 (idx: 12) ext_var:
; CHECKOBJ-NEXT: 20: 00 00 00 01 <unknown>
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: 00000024 (idx: 16) ext_zvar:
; CHECKOBJ-NEXT: 24: 00 00 00 00 <unknown>
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: 00000028 (idx: 18) ext_fun[DS]:
; CHECKOBJ-NEXT: 28: 00 00 00 00 <unknown>
; CHECKOBJ-NEXT: 2c: 00 00 00 34 <unknown>
; CHECKOBJ-NEXT: 30: 00 00 00 00 <unknown>
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: 00000034 (idx: 22) ext_var[TC]:
; CHECKOBJ-NEXT: 34: 00 00 00 20 <unknown>
; CHECKOBJ-EMPTY:
; CHECKOBJ-NEXT: 00000038 (idx: 24) ext_zvar[TC]:
; CHECKOBJ-NEXT: 38: 00 00 00 24 <unknown>
; 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: }