diff --git a/llvm/include/llvm/Object/XCOFFObjectFile.h b/llvm/include/llvm/Object/XCOFFObjectFile.h --- a/llvm/include/llvm/Object/XCOFFObjectFile.h +++ b/llvm/include/llvm/Object/XCOFFObjectFile.h @@ -348,6 +348,57 @@ uint8_t Pad[10]; }; // 32-bit XCOFF file only. +struct XCOFFFunctionAuxEnt32 { + support::ubig32_t OffsetToExceptionTbl; + support::ubig32_t SizeOfFunction; + support::ubig32_t PtrToLineNum; + support::big32_t SymIdxOfNextBeyond; + uint8_t Pad[2]; +}; + +struct XCOFFFunctionAuxEnt64 { + support::ubig64_t PtrToLineNum; + support::ubig32_t SizeOfFunction; + support::big32_t SymIdxOfNextBeyond; + uint8_t Pad; + XCOFF::SymbolAuxType AuxType; // Contains _AUX_FCN; Type of auxiliary entry +}; + +struct XCOFFExcpetionAuxEnt { + support::ubig64_t OffsetToExceptionTbl; + support::ubig32_t SizeOfFunction; + support::big32_t SymIdxOfNextBeyond; + uint8_t Pad; + XCOFF::SymbolAuxType AuxType; // Contains _AUX_EXCEPT; Type of auxiliary entry +}; + +struct XCOFFBlockAuxEnt32 { + uint8_t ReservedZeros_1[2]; + support::ubig16_t LineNum_Hi; + support::ubig16_t LineNum_Lo; + uint8_t ReservedZeros_2[12]; +}; + +struct XCOFFBlockAuxEnt64 { + support::ubig32_t LineNum; + uint8_t Pad[13]; + XCOFF::SymbolAuxType AuxType; // Contains _AUX_SYM; Type of auxiliary entry +}; + +struct XCOFFSectAuxEntForDWARF32 { + support::ubig32_t LengthOfSectionPortion; + uint8_t Pad1[4]; + support::ubig32_t NumberOfRelocEnt; + uint8_t Pad2[6]; +}; + +struct XCOFFSectAuxEntForDWARF64 { + support::ubig64_t LengthOfSectionPortion; + support::ubig64_t NumberOfRelocEnt; + uint8_t Pad; + XCOFF::SymbolAuxType AuxType; // Contains _AUX_SECT; Type of Auxillary entry +}; + template struct XCOFFRelocation { // Masks for packing/unpacking the r_rsize field of relocations. diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp --- a/llvm/lib/Object/XCOFFObjectFile.cpp +++ b/llvm/lib/Object/XCOFFObjectFile.cpp @@ -1112,8 +1112,12 @@ return true; Expected ExpCsectAuxEnt = getXCOFFCsectAuxRef(); - if (!ExpCsectAuxEnt) + if (!ExpCsectAuxEnt) { + // If we could not get the CSECT auxiliary entry, then this symbol should + // not be a function. So consume the error and return `false` to move on. + consumeError(ExpCsectAuxEnt.takeError()); return false; + } const XCOFFCsectAuxRef CsectAuxRef = ExpCsectAuxEnt.get(); diff --git a/llvm/test/tools/llvm-readobj/XCOFF/Inputs/file-aux-wrong64.o b/llvm/test/tools/llvm-readobj/XCOFF/Inputs/file-aux-wrong64.o deleted file mode 100644 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 GIT binary patch literal 0 Hc$@&1 | FileCheck %s -DFILE=%t1 --check-prefix=CASE1 + +# CASE1: llvm-readobj: warning: '[[FILE]]': the C_EXT/C_WEAKEXT/C_HIDEXT symbol, which is not for a function, should have only 1 auxiliary entry, i.e. the CSECT auxiliary entry + +--- !XCOFF +FileHeader: + MagicNumber: 0x1DF +Symbols: + - Name: .fun + StorageClass: [[STORAGECLASS='C_EXT']] + NumberOfAuxEntries: 2 + +# RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_STAT' -o %t2 +# RUN: llvm-readobj --syms %t2 2>&1 | FileCheck %s -DFILE=%t2 --check-prefix=CASE2 + +# CASE2: llvm-readobj: warning: '[[FILE]]': C_STAT symbol should not have more than 1 auxiliary entry. + + +# RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_DWARF' -o %t3 +# RUN: llvm-readobj --syms %t3 2>&1 | FileCheck %s -DFILE=%t3 --check-prefix=CASE3 + +# CASE3: llvm-readobj: warning: '[[FILE]]': C_DWARF symbol should not have more than 1 auxiliary entry + +# RUN: yaml2obj %s --docnum=1 -DSTORAGECLASS='C_BLOCK' -o %t4 +# RUN: llvm-readobj --syms %t4 2>&1 | FileCheck %s -DFILE=%t4 --check-prefix=CASE4 + +# CASE4: llvm-readobj: warning: '[[FILE]]': C_BLOCK or C_FCN symbol should not have more than 1 auxiliary entry + +## This case tests the raw data output ability when a file auxiliary entry does +## not have the matching auxiliary type. +# RUN: yaml2obj %s --docnum=2 -o %t5 +# RUN: llvm-readobj --syms %t5 | FileCheck %s --check-prefix=CASE5 + +# CASE5: Symbols [ +# CASE5-NEXT: Symbol { +# CASE5-NEXT: Index: 0 +# CASE5-NEXT: Name: .fun +# CASE5-NEXT: Value (SymbolTableIndex): 0x0 +# CASE5-NEXT: Section: N_UNDEF +# CASE5-NEXT: Source Language ID: TB_C (0x0) +# CASE5-NEXT: CPU Version ID: 0x0 +# CASE5-NEXT: StorageClass: C_FILE (0x67) +# CASE5-NEXT: NumberOfAuxEntries: 1 +# CASE5-NEXT: !Unexpected raw auxiliary entry data: +# CASE5-NEXT: 00000000 00000001 00020300 00000000 +# CASE5-NEXT: 00fb +# CASE5-NEXT: } +# CASE5-NEXT: ] + +--- !XCOFF +FileHeader: + MagicNumber: 0x1F7 +Symbols: + - Name: .fun + StorageClass: C_FILE + AuxEntries: + - Type: AUX_CSECT + ParameterHashIndex: 1 + TypeChkSectNum: 2 + SymbolAlignmentAndType: 3 + StorageMappingClass: XMC_PR diff --git a/llvm/test/tools/llvm-readobj/XCOFF/symbols.test b/llvm/test/tools/llvm-readobj/XCOFF/symbols.test --- a/llvm/test/tools/llvm-readobj/XCOFF/symbols.test +++ b/llvm/test/tools/llvm-readobj/XCOFF/symbols.test @@ -1,446 +1,271 @@ -# This file tests the ability of llvm-readobj to display the symbol table for a -# 32-bit XCOFF object file. -# The object file used is generated by the following source file -# and command on AIX: -# -# > cat test8.c -# -# extern int i; -# extern int TestforXcoff; -# extern int fun(int i); -# static int static_i; -# char* p="abcd"; -# int fun1(int j) { -# static_i++; -# j++; -# j=j+*p; -# return j; -# } -# -# int main() { -# i++; -# fun(i); -# return fun1(i); -# } -# -# > xlc -c test8.c -o symbol.o +## This file tests the ability of llvm-readobj to display the symbol table for a +## 32-bit XCOFF object file. -RUN: llvm-readobj --symbols %p/Inputs/symbol.o | \ -RUN: FileCheck --check-prefix=SYMBOL32 %s +# RUN: yaml2obj %s -o %t +# RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOL32 %s -SYMBOL32: File: {{.*}}symbol.o -SYMBOL32-NEXT: Format: aixcoff-rs6000 -SYMBOL32-NEXT: Arch: powerpc -SYMBOL32-NEXT: AddressSize: 32bit -SYMBOL32-NEXT: Symbols [ -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 0 -SYMBOL32-NEXT: Name: .file -SYMBOL32-NEXT: Value (SymbolTableIndex): 0x0 -SYMBOL32-NEXT: Section: N_DEBUG -SYMBOL32-NEXT: Source Language ID: TB_C (0x0) -SYMBOL32-NEXT: CPU Version ID: TCPU_COM (0x3) -SYMBOL32-NEXT: StorageClass: C_FILE (0x67) -SYMBOL32-NEXT: NumberOfAuxEntries: 3 -SYMBOL32-NEXT: File Auxiliary Entry { -SYMBOL32-NEXT: Index: 1 -SYMBOL32-NEXT: Name: test8.c -SYMBOL32-NEXT: Type: XFT_FN (0x0) -SYMBOL32-NEXT: } -SYMBOL32-NEXT: File Auxiliary Entry { -SYMBOL32-NEXT: Index: 2 -SYMBOL32-NEXT: Name: Sun Apr 28 15:56:49 2019 -SYMBOL32-NEXT: Type: XFT_CT (0x1) -SYMBOL32-NEXT: } -SYMBOL32-NEXT: File Auxiliary Entry { -SYMBOL32-NEXT: Index: 3 -SYMBOL32-NEXT: Name: IBM XL C for AIX, Version 16.1.0.2 -SYMBOL32-NEXT: Type: XFT_CV (0x2) -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 4 -SYMBOL32-NEXT: Name: .text -SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 -SYMBOL32-NEXT: Section: .text -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_STAT (0x3) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: Sect Auxiliary Entry For Stat { -SYMBOL32-NEXT: Index: 5 -SYMBOL32-NEXT: SectionLength: 256 -SYMBOL32-NEXT: NumberOfRelocEnt: 4 -SYMBOL32-NEXT: NumberOfLineNum: 0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 6 -SYMBOL32-NEXT: Name: .data -SYMBOL32-NEXT: Value (RelocatableAddress): 0x100 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_STAT (0x3) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: Sect Auxiliary Entry For Stat { -SYMBOL32-NEXT: Index: 7 -SYMBOL32-NEXT: SectionLength: 60 -SYMBOL32-NEXT: NumberOfRelocEnt: 11 -SYMBOL32-NEXT: NumberOfLineNum: 0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 8 -SYMBOL32-NEXT: Name: .bss -SYMBOL32-NEXT: Value (RelocatableAddress): 0x13C -SYMBOL32-NEXT: Section: .bss -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_STAT (0x3) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: Sect Auxiliary Entry For Stat { -SYMBOL32-NEXT: Index: 9 -SYMBOL32-NEXT: SectionLength: 4 -SYMBOL32-NEXT: NumberOfRelocEnt: 0 -SYMBOL32-NEXT: NumberOfLineNum: 0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 10 -SYMBOL32-NEXT: Name: -SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 -SYMBOL32-NEXT: Section: .text -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 11 -SYMBOL32-NEXT: SectionLen: 256 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 7 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 12 -SYMBOL32-NEXT: Name: .fun1 -SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 -SYMBOL32-NEXT: Section: .text -SYMBOL32-NEXT: Type: 0x20 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 13 -SYMBOL32-NEXT: ContainingCsectSymbolIndex: 10 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 0 -SYMBOL32-NEXT: SymbolType: XTY_LD (0x2) -SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 14 -SYMBOL32-NEXT: Name: .main -SYMBOL32-NEXT: Value (RelocatableAddress): 0x60 -SYMBOL32-NEXT: Section: .text -SYMBOL32-NEXT: Type: 0x20 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 15 -SYMBOL32-NEXT: ContainingCsectSymbolIndex: 10 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 0 -SYMBOL32-NEXT: SymbolType: XTY_LD (0x2) -SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 16 -SYMBOL32-NEXT: Name: TOC -SYMBOL32-NEXT: Value (RelocatableAddress): 0x100 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 17 -SYMBOL32-NEXT: SectionLen: 0 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC0 (0xF) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 18 -SYMBOL32-NEXT: Name: -SYMBOL32-NEXT: Value (RelocatableAddress): 0x114 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 19 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 20 -SYMBOL32-NEXT: Name: -SYMBOL32-NEXT: Value (RelocatableAddress): 0x134 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 21 -SYMBOL32-NEXT: SectionLen: 5 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 3 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_RO (0x1) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 22 -SYMBOL32-NEXT: Name: _$STATIC_BSS -SYMBOL32-NEXT: Value (RelocatableAddress): 0x13C -SYMBOL32-NEXT: Section: .bss -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 23 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_CM (0x3) -SYMBOL32-NEXT: StorageMappingClass: XMC_RW (0x5) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 24 -SYMBOL32-NEXT: Name: _$STATIC_BSS -SYMBOL32-NEXT: Value (RelocatableAddress): 0x104 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 25 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 26 -SYMBOL32-NEXT: Name: fun1 -SYMBOL32-NEXT: Value (RelocatableAddress): 0x118 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 27 -SYMBOL32-NEXT: SectionLen: 12 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_DS (0xA) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 28 -SYMBOL32-NEXT: Name: fun1 -SYMBOL32-NEXT: Value (RelocatableAddress): 0x100 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 29 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 30 -SYMBOL32-NEXT: Name: p -SYMBOL32-NEXT: Value (RelocatableAddress): 0x130 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 31 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_RW (0x5) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 32 -SYMBOL32-NEXT: Name: p -SYMBOL32-NEXT: Value (RelocatableAddress): 0x108 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 33 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 34 -SYMBOL32-NEXT: Name: main -SYMBOL32-NEXT: Value (RelocatableAddress): 0x124 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 35 -SYMBOL32-NEXT: SectionLen: 12 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_DS (0xA) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 36 -SYMBOL32-NEXT: Name: main -SYMBOL32-NEXT: Value (RelocatableAddress): 0x10C -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 37 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 38 -SYMBOL32-NEXT: Name: i -SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 -SYMBOL32-NEXT: Section: N_UNDEF -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 39 -SYMBOL32-NEXT: SectionLen: 0 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 0 -SYMBOL32-NEXT: SymbolType: XTY_ER (0x0) -SYMBOL32-NEXT: StorageMappingClass: XMC_UA (0x4) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 40 -SYMBOL32-NEXT: Name: i -SYMBOL32-NEXT: Value (RelocatableAddress): 0x110 -SYMBOL32-NEXT: Section: .data -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 41 -SYMBOL32-NEXT: SectionLen: 4 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 2 -SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) -SYMBOL32-NEXT: StorageMappingClass: XMC_TC (0x3) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: Symbol { -SYMBOL32-NEXT: Index: 42 -SYMBOL32-NEXT: Name: .fun -SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 -SYMBOL32-NEXT: Section: N_UNDEF -SYMBOL32-NEXT: Type: 0x0 -SYMBOL32-NEXT: StorageClass: C_EXT (0x2) -SYMBOL32-NEXT: NumberOfAuxEntries: 1 -SYMBOL32-NEXT: CSECT Auxiliary Entry { -SYMBOL32-NEXT: Index: 43 -SYMBOL32-NEXT: SectionLen: 0 -SYMBOL32-NEXT: ParameterHashIndex: 0x0 -SYMBOL32-NEXT: TypeChkSectNum: 0x0 -SYMBOL32-NEXT: SymbolAlignmentLog2: 0 -SYMBOL32-NEXT: SymbolType: XTY_ER (0x0) -SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) -SYMBOL32-NEXT: StabInfoIndex: 0x0 -SYMBOL32-NEXT: StabSectNum: 0x0 -SYMBOL32-NEXT: } -SYMBOL32-NEXT: } -SYMBOL32-NEXT: ] +--- !XCOFF +FileHeader: + MagicNumber: 0x1DF +Sections: + - Name: .text +Symbols: +## The C_FILE symbol with File auxiliary entries. + - Name: .file + Value: 0x0 + Section: N_DEBUG + Type: 0x0 + StorageClass: C_FILE + NumberOfAuxEntries: 3 + AuxEntries: + - Type: AUX_FILE + FileNameOrString: "test8.c" + FileStringType: XFT_FN + - Type: AUX_FILE + FileNameOrString: "Sun Apr 28 15:56:49 2019" + FileStringType: XFT_CT + - Type: AUX_FILE + FileNameOrString: "IBM XL C for AIX, Version 16.1.0.2" + FileStringType: XFT_CV +## The C_STAT symbol with a SECT auxiliary entry. + - Name: .text + Value: 0x0 + Section: .text + Type: 0x0 + StorageClass: C_STAT + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_STAT + SectionLength: 256 + NumberOfRelocEnt: 4 + NumberOfLineNum: 4 +## The C_HIDEXT symbol with a CSECT auxiliary entry. + - Value: 0x0 + Section: .text + Type: 0x0 + StorageClass: C_HIDEXT + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_CSECT + ParameterHashIndex: 2 + TypeChkSectNum: 3 + SymbolAlignmentAndType: 7 + StorageMappingClass: XMC_PR + SectionOrLength: 256 + StabInfoIndex: 5 + StabSectNum: 6 +## The C_EXT symbol with a CSECT auxiliary entry. + - Name: .fun1 + Value: 0x0 + Section: .text + Type: 0x20 + StorageClass: C_EXT + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_CSECT + ParameterHashIndex: 1 + TypeChkSectNum: 2 + SymbolAlignmentAndType: 3 + StorageMappingClass: XMC_PR + SectionOrLength: 256 + StabInfoIndex: 4 + StabSectNum: 5 +## The C_WEAKEXT symbol with a Function auxiliary entry and a CSECT auxiliary entry. + - Name: .fun2 + Value: 0x0 + Section: N_DEBUG + Type: 0x20 + StorageClass: C_WEAKEXT + NumberOfAuxEntries: 2 + AuxEntries: + - Type: AUX_FCN + OffsetToExceptionTbl: 2 + SizeOfFunction: 3 + SymIdxOfNextBeyond: 4 + PtrToLineNum: 5 + - Type: AUX_CSECT + ParameterHashIndex: 11 + TypeChkSectNum: 22 + SymbolAlignmentAndType: 33 + StorageMappingClass: XMC_PR + SectionOrLength: 256 + StabInfoIndex: 44 + StabSectNum: 55 +## The C_DWARF symbol with a SECT auxiliary entry. + - Name: .fun3 + Section: N_DEBUG + StorageClass: C_DWARF + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SECT + LengthOfSectionPortion: 2 + NumberOfRelocEnt: 3 +## The C_BLOCK symbol with a Block auxiliary entry. + - Name: .fun4 + StorageClass: C_BLOCK + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SYM + LineNum_Hi: 2 + LineNum_Lo: 3 +## The C_FCN symbol with a Block auxiliary entry. + - Name: .fun5 + StorageClass: C_FCN + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SYM + LineNum_Hi: 2 + LineNum_Lo: 3 + +# SYMBOL32: AddressSize: 32bit +# SYMBOL32-NEXT: Symbols [ +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 0 +# SYMBOL32-NEXT: Name: .file +# SYMBOL32-NEXT: Value (SymbolTableIndex): 0x0 +# SYMBOL32-NEXT: Section: N_DEBUG +# SYMBOL32-NEXT: Source Language ID: TB_C (0x0) +# SYMBOL32-NEXT: CPU Version ID: 0x0 +# SYMBOL32-NEXT: StorageClass: C_FILE (0x67) +# SYMBOL32-NEXT: NumberOfAuxEntries: 3 +# SYMBOL32-NEXT: File Auxiliary Entry { +# SYMBOL32-NEXT: Index: 1 +# SYMBOL32-NEXT: Name: test8.c +# SYMBOL32-NEXT: Type: XFT_FN (0x0) +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: File Auxiliary Entry { +# SYMBOL32-NEXT: Index: 2 +# SYMBOL32-NEXT: Name: Sun Apr 28 15:56:49 2019 +# SYMBOL32-NEXT: Type: XFT_CT (0x1) +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: File Auxiliary Entry { +# SYMBOL32-NEXT: Index: 3 +# SYMBOL32-NEXT: Name: IBM XL C for AIX, Version 16.1.0.2 +# SYMBOL32-NEXT: Type: XFT_CV (0x2) +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 4 +# SYMBOL32-NEXT: Name: .text +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: .text +# SYMBOL32-NEXT: Type: 0x0 +# SYMBOL32-NEXT: StorageClass: C_STAT (0x3) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: Sect Auxiliary Entry For Stat { +# SYMBOL32-NEXT: Index: 5 +# SYMBOL32-NEXT: SectionLength: 256 +# SYMBOL32-NEXT: NumberOfRelocEnt: 4 +# SYMBOL32-NEXT: NumberOfLineNum: 4 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 6 +# SYMBOL32-NEXT: Name: +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: .text +# SYMBOL32-NEXT: Type: 0x0 +# SYMBOL32-NEXT: StorageClass: C_HIDEXT (0x6B) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: CSECT Auxiliary Entry { +# SYMBOL32-NEXT: Index: 7 +# SYMBOL32-NEXT: SectionLen: 256 +# SYMBOL32-NEXT: ParameterHashIndex: 0x2 +# SYMBOL32-NEXT: TypeChkSectNum: 0x3 +# SYMBOL32-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL32-NEXT: SymbolType: 0x7 +# SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL32-NEXT: StabInfoIndex: 0x5 +# SYMBOL32-NEXT: StabSectNum: 0x6 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 8 +# SYMBOL32-NEXT: Name: .fun1 +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: .text +# SYMBOL32-NEXT: Type: 0x20 +# SYMBOL32-NEXT: StorageClass: C_EXT (0x2) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: CSECT Auxiliary Entry { +# SYMBOL32-NEXT: Index: 9 +# SYMBOL32-NEXT: SectionLen: 256 +# SYMBOL32-NEXT: ParameterHashIndex: 0x1 +# SYMBOL32-NEXT: TypeChkSectNum: 0x2 +# SYMBOL32-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL32-NEXT: SymbolType: XTY_CM (0x3) +# SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL32-NEXT: StabInfoIndex: 0x4 +# SYMBOL32-NEXT: StabSectNum: 0x5 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 10 +# SYMBOL32-NEXT: Name: .fun2 +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: N_DEBUG +# SYMBOL32-NEXT: Type: 0x20 +# SYMBOL32-NEXT: StorageClass: C_WEAKEXT (0x6F) +# SYMBOL32-NEXT: NumberOfAuxEntries: 2 +# SYMBOL32-NEXT: Function Auxiliary Entry { +# SYMBOL32-NEXT: Index: 11 +# SYMBOL32-NEXT: OffsetToExceptionTable: 0x2 +# SYMBOL32-NEXT: SizeOfFunction: 0x3 +# SYMBOL32-NEXT: PointerToLineNum: 0x5 +# SYMBOL32-NEXT: SymbolIndexOfNextBeyond: 4 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: CSECT Auxiliary Entry { +# SYMBOL32-NEXT: Index: 12 +# SYMBOL32-NEXT: SectionLen: 256 +# SYMBOL32-NEXT: ParameterHashIndex: 0xB +# SYMBOL32-NEXT: TypeChkSectNum: 0x16 +# SYMBOL32-NEXT: SymbolAlignmentLog2: 4 +# SYMBOL32-NEXT: SymbolType: XTY_SD (0x1) +# SYMBOL32-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL32-NEXT: StabInfoIndex: 0x2C +# SYMBOL32-NEXT: StabSectNum: 0x37 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 13 +# SYMBOL32-NEXT: Name: .fun3 +# SYMBOL32-NEXT: Value (OffsetInDWARF): 0x0 +# SYMBOL32-NEXT: Section: N_DEBUG +# SYMBOL32-NEXT: Type: 0x0 +# SYMBOL32-NEXT: StorageClass: C_DWARF (0x70) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: Sect Auxiliary Entry For DWARF { +# SYMBOL32-NEXT: Index: 14 +# SYMBOL32-NEXT: LengthOfSectionPortion: 0x2 +# SYMBOL32-NEXT: NumberOfRelocEntries: 3 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 15 +# SYMBOL32-NEXT: Name: .fun4 +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: N_UNDEF +# SYMBOL32-NEXT: Type: 0x0 +# SYMBOL32-NEXT: StorageClass: C_BLOCK (0x64) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: Block Auxiliary Entry { +# SYMBOL32-NEXT: Index: 16 +# SYMBOL32-NEXT: LineNumber(High 2 Bytes): 0x2 +# SYMBOL32-NEXT: LineNumber(Low 2 Bytes): 0x3 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: Symbol { +# SYMBOL32-NEXT: Index: 17 +# SYMBOL32-NEXT: Name: .fun5 +# SYMBOL32-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL32-NEXT: Section: N_UNDEF +# SYMBOL32-NEXT: Type: 0x0 +# SYMBOL32-NEXT: StorageClass: C_FCN (0x65) +# SYMBOL32-NEXT: NumberOfAuxEntries: 1 +# SYMBOL32-NEXT: Block Auxiliary Entry { +# SYMBOL32-NEXT: Index: 18 +# SYMBOL32-NEXT: LineNumber(High 2 Bytes): 0x2 +# SYMBOL32-NEXT: LineNumber(Low 2 Bytes): 0x3 +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: } +# SYMBOL32-NEXT: ] diff --git a/llvm/test/tools/llvm-readobj/XCOFF/symbols64.test b/llvm/test/tools/llvm-readobj/XCOFF/symbols64.test --- a/llvm/test/tools/llvm-readobj/XCOFF/symbols64.test +++ b/llvm/test/tools/llvm-readobj/XCOFF/symbols64.test @@ -1,387 +1,295 @@ ## This file tests the ability of llvm-readobj to display the symbol table for a ## 64-bit XCOFF object file. -## The object file used is generated by the following source file -## and command on AIX: -## -## > cat test8.c -## -## extern int i; -## extern int TestforXcoff; -## extern int fun(int i); -## static int static_i; -## char* p="abcd"; -## int fun1(int j) { -## static_i++; -## j++; -## j=j+*p; -## return j; -## } -## -## int main() { -## i++; -## fun(i); -## return fun1(i); -## } -## -## > xlc -q64 -c test8.c -o symbol64.o -# RUN: llvm-readobj --symbols %p/Inputs/symbol64.o | \ -# RUN: FileCheck --check-prefix=SYMBOL64 %s +# RUN: yaml2obj %s -o %t +# RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOL64 %s -# SYMBOL64: File: {{.*}}symbol64.o -# SYMBOL64-NEXT: Format: aix5coff64-rs6000 -# SYMBOL64-NEXT: Arch: powerpc64 -# SYMBOL64-NEXT: AddressSize: 64bit -# SYMBOL64-NEXT: Symbols [ -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 0 -# SYMBOL64-NEXT: Name: .file -# SYMBOL64-NEXT: Value (SymbolTableIndex): 0x0 -# SYMBOL64-NEXT: Section: N_DEBUG -# SYMBOL64-NEXT: Source Language ID: TB_C (0x0) -# SYMBOL64-NEXT: CPU Version ID: TCPU_PPC64 (0x2) -# SYMBOL64-NEXT: StorageClass: C_FILE (0x67) -# SYMBOL64-NEXT: NumberOfAuxEntries: 3 -# SYMBOL64-NEXT: File Auxiliary Entry { -# SYMBOL64-NEXT: Index: 1 -# SYMBOL64-NEXT: Name: test64.c -# SYMBOL64-NEXT: Type: XFT_FN (0x0) -# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: File Auxiliary Entry { -# SYMBOL64-NEXT: Index: 2 -# SYMBOL64-NEXT: Name: Mon Aug 10 16:07:48 2020 -# SYMBOL64-NEXT: Type: XFT_CT (0x1) -# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: File Auxiliary Entry { -# SYMBOL64-NEXT: Index: 3 -# SYMBOL64-NEXT: Name: IBM XL C for AIX, Version 16.1.0.6 -# SYMBOL64-NEXT: Type: XFT_CV (0x2) -# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 4 -# SYMBOL64-NEXT: Name: -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 -# SYMBOL64-NEXT: Section: .text -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 5 -# SYMBOL64-NEXT: SectionLen: 256 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 7 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 6 -# SYMBOL64-NEXT: Name: .fun1 -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 -# SYMBOL64-NEXT: Section: .text -# SYMBOL64-NEXT: Type: 0x20 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 7 -# SYMBOL64-NEXT: ContainingCsectSymbolIndex: 4 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 -# SYMBOL64-NEXT: SymbolType: XTY_LD (0x2) -# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 8 -# SYMBOL64-NEXT: Name: .main -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x80 -# SYMBOL64-NEXT: Section: .text -# SYMBOL64-NEXT: Type: 0x20 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 9 -# SYMBOL64-NEXT: ContainingCsectSymbolIndex: 4 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 -# SYMBOL64-NEXT: SymbolType: XTY_LD (0x2) -# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 10 -# SYMBOL64-NEXT: Name: TOC -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x100 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 11 -# SYMBOL64-NEXT: SectionLen: 0 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 2 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC0 (0xF) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 12 -# SYMBOL64-NEXT: Name: -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x128 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 13 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 14 -# SYMBOL64-NEXT: Name: -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x168 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 15 -# SYMBOL64-NEXT: SectionLen: 5 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_RO (0x1) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 16 -# SYMBOL64-NEXT: Name: _$STATIC_BSS -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x170 -# SYMBOL64-NEXT: Section: .bss -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 17 -# SYMBOL64-NEXT: SectionLen: 4 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 2 -# SYMBOL64-NEXT: SymbolType: XTY_CM (0x3) -# SYMBOL64-NEXT: StorageMappingClass: XMC_RW (0x5) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 18 -# SYMBOL64-NEXT: Name: _$STATIC_BSS -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x108 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 19 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 20 -# SYMBOL64-NEXT: Name: fun1 -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x130 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 21 -# SYMBOL64-NEXT: SectionLen: 24 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_DS (0xA) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 22 -# SYMBOL64-NEXT: Name: fun1 -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x100 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 23 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 24 -# SYMBOL64-NEXT: Name: p -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x160 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 25 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_RW (0x5) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 26 -# SYMBOL64-NEXT: Name: p -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x110 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 27 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 28 -# SYMBOL64-NEXT: Name: main -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x148 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 29 -# SYMBOL64-NEXT: SectionLen: 24 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_DS (0xA) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 30 -# SYMBOL64-NEXT: Name: main -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x118 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 31 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 32 -# SYMBOL64-NEXT: Name: i -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 -# SYMBOL64-NEXT: Section: N_UNDEF -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 33 -# SYMBOL64-NEXT: SectionLen: 0 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 -# SYMBOL64-NEXT: SymbolType: XTY_ER (0x0) -# SYMBOL64-NEXT: StorageMappingClass: XMC_UA (0x4) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 34 -# SYMBOL64-NEXT: Name: i -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x120 -# SYMBOL64-NEXT: Section: .data -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 35 -# SYMBOL64-NEXT: SectionLen: 8 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 3 -# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) -# SYMBOL64-NEXT: StorageMappingClass: XMC_TC (0x3) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: Symbol { -# SYMBOL64-NEXT: Index: 36 -# SYMBOL64-NEXT: Name: .fun -# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 -# SYMBOL64-NEXT: Section: N_UNDEF -# SYMBOL64-NEXT: Type: 0x0 -# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) -# SYMBOL64-NEXT: NumberOfAuxEntries: 1 -# SYMBOL64-NEXT: CSECT Auxiliary Entry { -# SYMBOL64-NEXT: Index: 37 -# SYMBOL64-NEXT: SectionLen: 0 -# SYMBOL64-NEXT: ParameterHashIndex: 0x0 -# SYMBOL64-NEXT: TypeChkSectNum: 0x0 -# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 -# SYMBOL64-NEXT: SymbolType: XTY_ER (0x0) -# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) -# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: } -# SYMBOL64-NEXT: ] +--- !XCOFF +FileHeader: + MagicNumber: 0x1F7 +Sections: + - Name: .text +Symbols: +## The C_FILE symbol with File auxiliary entries. + - Name: .file + Value: 0x0 + Section: N_DEBUG + Type: 0x0 + StorageClass: C_FILE + NumberOfAuxEntries: 3 + AuxEntries: + - Type: AUX_FILE + FileNameOrString: "test8.c" + FileStringType: XFT_FN + - Type: AUX_FILE + FileNameOrString: "Sun Apr 28 15:56:49 2019" + FileStringType: XFT_CT + - Type: AUX_FILE + FileNameOrString: "IBM XL C for AIX, Version 16.1.0.2" + FileStringType: XFT_CV +## The C_HIDEXT symbol with a CSECT auxiliary entry. + - Value: 0x0 + Section: .text + Type: 0x0 + StorageClass: C_HIDEXT + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_CSECT + ParameterHashIndex: 2 + TypeChkSectNum: 3 + SymbolAlignmentAndType: 1 + StorageMappingClass: XMC_PR + SectionOrLengthLo: 4 + SectionOrLengthHi: 5 +## The C_EXT symbol with a CSECT auxiliary entry. + - Name: .fun1 + Value: 0x0 + Section: .text + Type: 0x20 + StorageClass: C_EXT + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_CSECT + ParameterHashIndex: 2 + TypeChkSectNum: 3 + SymbolAlignmentAndType: 1 + StorageMappingClass: XMC_PR + SectionOrLengthLo: 4 + SectionOrLengthHi: 5 +## The C_WEAKEXT symbol with a Function auxiliary entry and a CSECT auxiliary entry. + - Name: .fun2 + Value: 0x0 + Section: N_DEBUG + Type: 0x20 + StorageClass: C_WEAKEXT + NumberOfAuxEntries: 2 + AuxEntries: + - Type: AUX_FCN + SizeOfFunction: 3 + SymIdxOfNextBeyond: 4 + PtrToLineNum: 5 + - Type: AUX_CSECT + ParameterHashIndex: 2 + TypeChkSectNum: 3 + SymbolAlignmentAndType: 1 + StorageMappingClass: XMC_PR + SectionOrLengthLo: 4 + SectionOrLengthHi: 5 +## The C_EXT symbol with a Function auxiliary entry, a CSECT auxiliary entry, and an Exception auxiliary entry. + - Name: .fun1 + Value: 0x0 + Section: .text + Type: 0x20 + StorageClass: C_EXT + NumberOfAuxEntries: 3 + AuxEntries: + - Type: AUX_FCN + SizeOfFunction: 3 + SymIdxOfNextBeyond: 4 + PtrToLineNum: 5 + - Type: AUX_EXCEPT + OffsetToExceptionTbl: 2 + SizeOfFunction: 3 + SymIdxOfNextBeyond: 4 + - Type: AUX_CSECT + ParameterHashIndex: 2 + TypeChkSectNum: 3 + SymbolAlignmentAndType: 1 + StorageMappingClass: XMC_PR + SectionOrLengthLo: 4 + SectionOrLengthHi: 5 +## The C_DWARF symbol with a SECT auxiliary entry. + - Name: .fun3 + Section: N_DEBUG + StorageClass: C_DWARF + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SECT + LengthOfSectionPortion: 2 + NumberOfRelocEnt: 3 +## The C_BLOCK symbol with a Block auxiliary entry. + - Name: .fun4 + StorageClass: C_BLOCK + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SYM + LineNum: 3 +## The C_FCN symbol with a Block auxiliary entry. + - Name: .fun5 + StorageClass: C_FCN + NumberOfAuxEntries: 1 + AuxEntries: + - Type: AUX_SYM + LineNum: 3 + +# SYMBOL64: AddressSize: 64bit +# SYMBOL64-NEXT: Symbols [ +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 0 +# SYMBOL64-NEXT: Name: .file +# SYMBOL64-NEXT: Value (SymbolTableIndex): 0x0 +# SYMBOL64-NEXT: Section: N_DEBUG +# SYMBOL64-NEXT: Source Language ID: TB_C (0x0) +# SYMBOL64-NEXT: CPU Version ID: 0x0 +# SYMBOL64-NEXT: StorageClass: C_FILE (0x67) +# SYMBOL64-NEXT: NumberOfAuxEntries: 3 +# SYMBOL64-NEXT: File Auxiliary Entry { +# SYMBOL64-NEXT: Index: 1 +# SYMBOL64-NEXT: Name: test8.c +# SYMBOL64-NEXT: Type: XFT_FN (0x0) +# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: File Auxiliary Entry { +# SYMBOL64-NEXT: Index: 2 +# SYMBOL64-NEXT: Name: Sun Apr 28 15:56:49 2019 +# SYMBOL64-NEXT: Type: XFT_CT (0x1) +# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: File Auxiliary Entry { +# SYMBOL64-NEXT: Index: 3 +# SYMBOL64-NEXT: Name: IBM XL C for AIX, Version 16.1.0.2 +# SYMBOL64-NEXT: Type: XFT_CV (0x2) +# SYMBOL64-NEXT: Auxiliary Type: AUX_FILE (0xFC) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 4 +# SYMBOL64-NEXT: Name: +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: .text +# SYMBOL64-NEXT: Type: 0x0 +# SYMBOL64-NEXT: StorageClass: C_HIDEXT (0x6B) +# SYMBOL64-NEXT: NumberOfAuxEntries: 1 +# SYMBOL64-NEXT: CSECT Auxiliary Entry { +# SYMBOL64-NEXT: Index: 5 +# SYMBOL64-NEXT: SectionLen: 21474836484 +# SYMBOL64-NEXT: ParameterHashIndex: 0x2 +# SYMBOL64-NEXT: TypeChkSectNum: 0x3 +# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) +# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 6 +# SYMBOL64-NEXT: Name: .fun1 +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: .text +# SYMBOL64-NEXT: Type: 0x20 +# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) +# SYMBOL64-NEXT: NumberOfAuxEntries: 1 +# SYMBOL64-NEXT: CSECT Auxiliary Entry { +# SYMBOL64-NEXT: Index: 7 +# SYMBOL64-NEXT: SectionLen: 21474836484 +# SYMBOL64-NEXT: ParameterHashIndex: 0x2 +# SYMBOL64-NEXT: TypeChkSectNum: 0x3 +# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) +# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 8 +# SYMBOL64-NEXT: Name: .fun2 +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: N_DEBUG +# SYMBOL64-NEXT: Type: 0x20 +# SYMBOL64-NEXT: StorageClass: C_WEAKEXT (0x6F) +# SYMBOL64-NEXT: NumberOfAuxEntries: 2 +# SYMBOL64-NEXT: Function Auxiliary Entry { +# SYMBOL64-NEXT: Index: 9 +# SYMBOL64-NEXT: SizeOfFunction: 0x3 +# SYMBOL64-NEXT: PointerToLineNum: 0x5 +# SYMBOL64-NEXT: SymbolIndexOfNextBeyond: 4 +# SYMBOL64-NEXT: Auxiliary Type: AUX_FCN (0xFE) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: CSECT Auxiliary Entry { +# SYMBOL64-NEXT: Index: 10 +# SYMBOL64-NEXT: SectionLen: 21474836484 +# SYMBOL64-NEXT: ParameterHashIndex: 0x2 +# SYMBOL64-NEXT: TypeChkSectNum: 0x3 +# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) +# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 11 +# SYMBOL64-NEXT: Name: .fun1 +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: .text +# SYMBOL64-NEXT: Type: 0x20 +# SYMBOL64-NEXT: StorageClass: C_EXT (0x2) +# SYMBOL64-NEXT: NumberOfAuxEntries: 3 +# SYMBOL64-NEXT: Function Auxiliary Entry { +# SYMBOL64-NEXT: Index: 12 +# SYMBOL64-NEXT: SizeOfFunction: 0x3 +# SYMBOL64-NEXT: PointerToLineNum: 0x5 +# SYMBOL64-NEXT: SymbolIndexOfNextBeyond: 4 +# SYMBOL64-NEXT: Auxiliary Type: AUX_FCN (0xFE) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Excpetion Auxiliary Entry { +# SYMBOL64-NEXT: Index: 13 +# SYMBOL64-NEXT: OffsetToExceptionTable: 0x2 +# SYMBOL64-NEXT: SizeOfFunction: 0x3 +# SYMBOL64-NEXT: SymbolIndexOfNextBeyond: 4 +# SYMBOL64-NEXT: Auxiliary Type: AUX_EXCEPT (0xFF) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: CSECT Auxiliary Entry { +# SYMBOL64-NEXT: Index: 14 +# SYMBOL64-NEXT: SectionLen: 21474836484 +# SYMBOL64-NEXT: ParameterHashIndex: 0x2 +# SYMBOL64-NEXT: TypeChkSectNum: 0x3 +# SYMBOL64-NEXT: SymbolAlignmentLog2: 0 +# SYMBOL64-NEXT: SymbolType: XTY_SD (0x1) +# SYMBOL64-NEXT: StorageMappingClass: XMC_PR (0x0) +# SYMBOL64-NEXT: Auxiliary Type: AUX_CSECT (0xFB) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 15 +# SYMBOL64-NEXT: Name: .fun3 +# SYMBOL64-NEXT: Value (OffsetInDWARF): 0x0 +# SYMBOL64-NEXT: Section: N_DEBUG +# SYMBOL64-NEXT: Type: 0x0 +# SYMBOL64-NEXT: StorageClass: C_DWARF (0x70) +# SYMBOL64-NEXT: NumberOfAuxEntries: 1 +# SYMBOL64-NEXT: Sect Auxiliary Entry For DWARF { +# SYMBOL64-NEXT: Index: 16 +# SYMBOL64-NEXT: LengthOfSectionPortion: 0x2 +# SYMBOL64-NEXT: NumberOfRelocEntries: 3 +# SYMBOL64-NEXT: Auxiliary Type: AUX_SECT (0xFA) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 17 +# SYMBOL64-NEXT: Name: .fun4 +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: N_UNDEF +# SYMBOL64-NEXT: Type: 0x0 +# SYMBOL64-NEXT: StorageClass: C_BLOCK (0x64) +# SYMBOL64-NEXT: NumberOfAuxEntries: 1 +# SYMBOL64-NEXT: Block Auxiliary Entry { +# SYMBOL64-NEXT: Index: 18 +# SYMBOL64-NEXT: LineNumber: 0x3 +# SYMBOL64-NEXT: Auxiliary Type: AUX_SYM (0xFD) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: Symbol { +# SYMBOL64-NEXT: Index: 19 +# SYMBOL64-NEXT: Name: .fun5 +# SYMBOL64-NEXT: Value (RelocatableAddress): 0x0 +# SYMBOL64-NEXT: Section: N_UNDEF +# SYMBOL64-NEXT: Type: 0x0 +# SYMBOL64-NEXT: StorageClass: C_FCN (0x65) +# SYMBOL64-NEXT: NumberOfAuxEntries: 1 +# SYMBOL64-NEXT: Block Auxiliary Entry { +# SYMBOL64-NEXT: Index: 20 +# SYMBOL64-NEXT: LineNumber: 0x3 +# SYMBOL64-NEXT: Auxiliary Type: AUX_SYM (0xFD) +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: } +# SYMBOL64-NEXT: ] diff --git a/llvm/tools/llvm-readobj/XCOFFDumper.cpp b/llvm/tools/llvm-readobj/XCOFFDumper.cpp --- a/llvm/tools/llvm-readobj/XCOFFDumper.cpp +++ b/llvm/tools/llvm-readobj/XCOFFDumper.cpp @@ -44,9 +44,16 @@ template void printSectionHeaders(ArrayRef Sections); template void printGenericSectionHeader(T &Sec) const; template void printOverflowSectionHeader(T &Sec) const; + template const T *getAuxEntPtr(uintptr_t AuxAddress); void printFileAuxEnt(const XCOFFFileAuxEnt *AuxEntPtr); void printCsectAuxEnt(XCOFFCsectAuxRef AuxEntRef); void printSectAuxEntForStat(const XCOFFSectAuxEntForStat *AuxEntPtr); + void printExcpetionAuxEnt(const XCOFFExcpetionAuxEnt *AuxEntPtr); + void printFunctionAuxEnt(const XCOFFFunctionAuxEnt32 *AuxEntPtr); + void printFunctionAuxEnt(const XCOFFFunctionAuxEnt64 *AuxEntPtr); + void printBlockAuxEnt(const XCOFFBlockAuxEnt32 *AuxEntPtr); + void printBlockAuxEnt(const XCOFFBlockAuxEnt64 *AuxEntPtr); + template void printSectAuxEntForDWARF(const T *AuxEntPtr); void printSymbol(const SymbolRef &); template void printRelocations(ArrayRef Sections); @@ -279,6 +286,77 @@ W.printNumber("NumberOfLineNum", AuxEntPtr->NumberOfLineNum); } +void XCOFFDumper::printExcpetionAuxEnt(const XCOFFExcpetionAuxEnt *AuxEntPtr) { + assert(Obj.is64Bit() && "64-bit interface called on 32-bit object file."); + + DictScope SymDs(W, "Excpetion Auxiliary Entry"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("OffsetToExceptionTable", AuxEntPtr->OffsetToExceptionTbl); + W.printHex("SizeOfFunction", AuxEntPtr->SizeOfFunction); + W.printNumber("SymbolIndexOfNextBeyond", AuxEntPtr->SymIdxOfNextBeyond); + W.printEnum("Auxiliary Type", static_cast(AuxEntPtr->AuxType), + makeArrayRef(SymAuxType)); +} + +void XCOFFDumper::printFunctionAuxEnt(const XCOFFFunctionAuxEnt32 *AuxEntPtr) { + assert(!Obj.is64Bit() && "32-bit interface called on 64-bit object file."); + + DictScope SymDs(W, "Function Auxiliary Entry"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("OffsetToExceptionTable", AuxEntPtr->OffsetToExceptionTbl); + W.printHex("SizeOfFunction", AuxEntPtr->SizeOfFunction); + W.printHex("PointerToLineNum", AuxEntPtr->PtrToLineNum); + W.printNumber("SymbolIndexOfNextBeyond", AuxEntPtr->SymIdxOfNextBeyond); +} + +void XCOFFDumper::printFunctionAuxEnt(const XCOFFFunctionAuxEnt64 *AuxEntPtr) { + assert(Obj.is64Bit() && "64-bit interface called on 32-bit object file."); + + DictScope SymDs(W, "Function Auxiliary Entry"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("SizeOfFunction", AuxEntPtr->SizeOfFunction); + W.printHex("PointerToLineNum", AuxEntPtr->PtrToLineNum); + W.printNumber("SymbolIndexOfNextBeyond", AuxEntPtr->SymIdxOfNextBeyond); + W.printEnum("Auxiliary Type", static_cast(AuxEntPtr->AuxType), + makeArrayRef(SymAuxType)); +} + +void XCOFFDumper::printBlockAuxEnt(const XCOFFBlockAuxEnt32 *AuxEntPtr) { + assert(!Obj.is64Bit() && "32-bit interface called on 64-bit object file."); + + DictScope SymDs(W, "Block Auxiliary Entry"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("LineNumber(High 2 Bytes)", AuxEntPtr->LineNum_Hi); + W.printHex("LineNumber(Low 2 Bytes)", AuxEntPtr->LineNum_Lo); +} + +void XCOFFDumper::printBlockAuxEnt(const XCOFFBlockAuxEnt64 *AuxEntPtr) { + assert(Obj.is64Bit() && "64-bit interface called on 32-bit object file."); + + DictScope SymDs(W, "Block Auxiliary Entry"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("LineNumber", AuxEntPtr->LineNum); + W.printEnum("Auxiliary Type", static_cast(AuxEntPtr->AuxType), + makeArrayRef(SymAuxType)); +} + +template +void XCOFFDumper::printSectAuxEntForDWARF(const T *AuxEntPtr) { + DictScope SymDs(W, "Sect Auxiliary Entry For DWARF"); + W.printNumber("Index", + Obj.getSymbolIndex(reinterpret_cast(AuxEntPtr))); + W.printHex("LengthOfSectionPortion", AuxEntPtr->LengthOfSectionPortion); + W.printNumber("NumberOfRelocEntries", AuxEntPtr->NumberOfRelocEnt); + if (Obj.is64Bit()) + W.printEnum("Auxiliary Type", static_cast(XCOFF::AUX_SECT), + makeArrayRef(SymAuxType)); +} + const EnumEntry SymStorageClass[] = { #define ECase(X) \ { #X, XCOFF::X } @@ -304,11 +382,13 @@ case XCOFF::C_WEAKEXT: case XCOFF::C_HIDEXT: case XCOFF::C_STAT: + case XCOFF::C_FCN: + case XCOFF::C_BLOCK: return "Value (RelocatableAddress)"; case XCOFF::C_FILE: return "Value (SymbolTableIndex)"; - case XCOFF::C_FCN: - case XCOFF::C_BLOCK: + case XCOFF::C_DWARF: + return "Value (OffsetInDWARF)"; case XCOFF::C_FUN: case XCOFF::C_STSYM: case XCOFF::C_BINCL: @@ -320,7 +400,6 @@ case XCOFF::C_RPSYM: case XCOFF::C_RSYM: case XCOFF::C_ECOML: - case XCOFF::C_DWARF: assert(false && "This StorageClass for the symbol is not yet implemented."); return ""; default: @@ -342,6 +421,22 @@ #undef ECase }; +template const T *XCOFFDumper::getAuxEntPtr(uintptr_t AuxAddress) { + const T *AuxEntPtr = reinterpret_cast(AuxAddress); +#ifndef NDEBUG + Obj.checkSymbolEntryPointer(reinterpret_cast(AuxEntPtr)); +#endif + return AuxEntPtr; +} + +static void printfUnexpectedRawAuxEnt(raw_ostream &OS, uintptr_t AuxAddress) { + OS << "!Unexpected raw auxiliary entry data:\n"; + OS << format_bytes( + ArrayRef(reinterpret_cast(AuxAddress), + XCOFF::SymbolTableEntrySize)) + << "\n"; +} + void XCOFFDumper::printSymbol(const SymbolRef &S) { DataRefImpl SymbolDRI = S.getRawDataRefImpl(); XCOFFSymbolRef SymbolEntRef = Obj.toSymbolRef(SymbolDRI); @@ -387,55 +482,59 @@ if (Obj.is64Bit() && *Obj.getSymbolAuxType(AuxAddress) != XCOFF::SymbolAuxType::AUX_FILE) { - W.startLine() << "!Unexpected raw auxiliary entry data:\n"; - W.startLine() << format_bytes( - ArrayRef( - reinterpret_cast(AuxAddress), - XCOFF::SymbolTableEntrySize), - 0, XCOFF::SymbolTableEntrySize) - << "\n"; + printfUnexpectedRawAuxEnt(W.startLine(), AuxAddress); continue; } const XCOFFFileAuxEnt *FileAuxEntPtr = - reinterpret_cast(AuxAddress); -#ifndef NDEBUG - Obj.checkSymbolEntryPointer(reinterpret_cast(FileAuxEntPtr)); -#endif + getAuxEntPtr(AuxAddress); printFileAuxEnt(FileAuxEntPtr); } break; case XCOFF::C_EXT: case XCOFF::C_WEAKEXT: case XCOFF::C_HIDEXT: { - // If the symbol is for a function, and it has more than 1 auxiliary entry, - // then one of them must be function auxiliary entry which we do not - // support yet. - if (SymbolEntRef.isFunction() && NumberOfAuxEntries >= 2) - report_fatal_error("Function auxiliary entry printing is unimplemented."); - - // If there is more than 1 auxiliary entry, instead of printing out - // error information, print out the raw Auxiliary entry. - // For 32-bit object, print from first to the last - 1. The last one must be - // a CSECT Auxiliary Entry. - // For 64-bit object, print from first to last and skips if SymbolAuxType is + if (!SymbolEntRef.isFunction() && NumberOfAuxEntries > 1) + reportUniqueWarning( + "the C_EXT/C_WEAKEXT/C_HIDEXT symbol, which is not for a function, " + "should have only 1 auxiliary entry, i.e. the CSECT auxiliary entry"); + + // For 32-bit object, print the function auxiliary symbol table entry. The + // last one must be a CSECT auxiliary entry. + // For 64-bit object, both a function auxiliary entry and an exeption + // auxiliary entry may appear, print them and skips if SymbolAuxType is // AUX_CSECT. for (int I = 1; I <= NumberOfAuxEntries; I++) { - if (I == NumberOfAuxEntries && !Obj.is64Bit()) + if ((I == NumberOfAuxEntries && !Obj.is64Bit()) || + !SymbolEntRef.isFunction()) break; uintptr_t AuxAddress = XCOFFObjectFile::getAdvancedSymbolEntryAddress( SymbolEntRef.getEntryAddress(), I); - if (Obj.is64Bit() && - *Obj.getSymbolAuxType(AuxAddress) == XCOFF::SymbolAuxType::AUX_CSECT) - continue; - W.startLine() << "!Unexpected raw auxiliary entry data:\n"; - W.startLine() << format_bytes( - ArrayRef(reinterpret_cast(AuxAddress), - XCOFF::SymbolTableEntrySize)); + if (Obj.is64Bit()) { + XCOFF::SymbolAuxType Type = *Obj.getSymbolAuxType(AuxAddress); + if (Type == XCOFF::SymbolAuxType::AUX_CSECT) + continue; + else if (Type == XCOFF::SymbolAuxType::AUX_FCN) { + const XCOFFFunctionAuxEnt64 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printFunctionAuxEnt(AuxEntPtr); + } else if (Type == XCOFF::SymbolAuxType::AUX_EXCEPT) { + const XCOFFExcpetionAuxEnt *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printExcpetionAuxEnt(AuxEntPtr); + } else { + printfUnexpectedRawAuxEnt(W.startLine(), AuxAddress); + } + } else { + const XCOFFFunctionAuxEnt32 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printFunctionAuxEnt(AuxEntPtr); + } } + // Print the CSECT auxiliary entry. auto ErrOrCsectAuxRef = SymbolEntRef.getXCOFFCsectAuxRef(); if (!ErrOrCsectAuxRef) reportUniqueWarning(ErrOrCsectAuxRef.takeError()); @@ -444,34 +543,62 @@ break; } - case XCOFF::C_STAT: + case XCOFF::C_STAT: { if (NumberOfAuxEntries > 1) - report_fatal_error( + reportUniqueWarning( "C_STAT symbol should not have more than 1 auxiliary entry."); - const XCOFFSectAuxEntForStat *StatAuxEntPtr; - StatAuxEntPtr = reinterpret_cast( - XCOFFObjectFile::getAdvancedSymbolEntryAddress( - SymbolEntRef.getEntryAddress(), 1)); -#ifndef NDEBUG - Obj.checkSymbolEntryPointer(reinterpret_cast(StatAuxEntPtr)); -#endif + const XCOFFSectAuxEntForStat *StatAuxEntPtr = + getAuxEntPtr( + XCOFFObjectFile::getAdvancedSymbolEntryAddress( + SymbolEntRef.getEntryAddress(), 1)); printSectAuxEntForStat(StatAuxEntPtr); break; - case XCOFF::C_DWARF: + } + case XCOFF::C_DWARF: { + if (NumberOfAuxEntries > 1) + reportUniqueWarning( + "C_DWARF symbol should not have more than 1 auxiliary entry"); + + uintptr_t AuxAddress = XCOFFObjectFile::getAdvancedSymbolEntryAddress( + SymbolEntRef.getEntryAddress(), 1); + + if (Obj.is64Bit()) { + const XCOFFSectAuxEntForDWARF64 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printSectAuxEntForDWARF(AuxEntPtr); + } else { + const XCOFFSectAuxEntForDWARF32 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printSectAuxEntForDWARF(AuxEntPtr); + } + break; + } case XCOFF::C_BLOCK: - case XCOFF::C_FCN: - report_fatal_error("Symbol table entry printing for this storage class " - "type is unimplemented."); + case XCOFF::C_FCN: { + if (NumberOfAuxEntries > 1) + reportUniqueWarning("C_BLOCK or C_FCN symbol should not have more than 1 " + "auxiliary entry"); + + uintptr_t AuxAddress = XCOFFObjectFile::getAdvancedSymbolEntryAddress( + SymbolEntRef.getEntryAddress(), 1); + + if (Obj.is64Bit()) { + const XCOFFBlockAuxEnt64 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printBlockAuxEnt(AuxEntPtr); + } else { + const XCOFFBlockAuxEnt32 *AuxEntPtr = + getAuxEntPtr(AuxAddress); + printBlockAuxEnt(AuxEntPtr); + } break; + } default: for (int i = 1; i <= NumberOfAuxEntries; i++) { - W.startLine() << "!Unexpected raw auxiliary entry data:\n"; - W.startLine() << format_bytes( - ArrayRef(reinterpret_cast( + printfUnexpectedRawAuxEnt(W.startLine(), XCOFFObjectFile::getAdvancedSymbolEntryAddress( - SymbolEntRef.getEntryAddress(), i)), - XCOFF::SymbolTableEntrySize)); + SymbolEntRef.getEntryAddress(), i)); } break; }