[PATCH] D68650: [AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 08:45:16 PDT 2019
DiggerLin created this revision.
DiggerLin added reviewers: hubert.reinterpretcast, sfertile, jasonliu.
Herald added subscribers: llvm-commits, seiya, rupprecht.
Herald added a project: LLVM.
DiggerLin retitled this revision from "[AIX][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength." to "[AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.".
According the the XCOFF document,
If
Then
XTY_SD
x_scnlen contains the csect length.
XTY_LD
x_scnlen contains the symbol table index of the containing csect.
XTY_CM
x_scnlen contains the csect length.
XTY_ER
x_scnlen contains 0.
Change the SectionLen member name to SectionOrLength is more reasonable .
Repository:
rL LLVM
https://reviews.llvm.org/D68650
Files:
llvm/include/llvm/Object/XCOFFObjectFile.h
llvm/tools/llvm-readobj/XCOFFDumper.cpp
Index: llvm/tools/llvm-readobj/XCOFFDumper.cpp
===================================================================
--- llvm/tools/llvm-readobj/XCOFFDumper.cpp
+++ llvm/tools/llvm-readobj/XCOFFDumper.cpp
@@ -213,9 +213,9 @@
W.printNumber("Index",
Obj.getSymbolIndex(reinterpret_cast<uintptr_t>(AuxEntPtr)));
if ((AuxEntPtr->SymbolAlignmentAndType & SymbolTypeMask) == XCOFF::XTY_LD)
- W.printNumber("ContainingCsectSymbolIndex", AuxEntPtr->SectionLen);
+ W.printNumber("ContainingCsectSymbolIndex", AuxEntPtr->SectionOrLength);
else
- W.printNumber("SectionLen", AuxEntPtr->SectionLen);
+ W.printNumber("SectionLen", AuxEntPtr->SectionOrLength);
W.printHex("ParameterHashIndex", AuxEntPtr->ParameterHashIndex);
W.printHex("TypeChkSectNum", AuxEntPtr->TypeChkSectNum);
// Print out symbol alignment and type.
Index: llvm/include/llvm/Object/XCOFFObjectFile.h
===================================================================
--- llvm/include/llvm/Object/XCOFFObjectFile.h
+++ llvm/include/llvm/Object/XCOFFObjectFile.h
@@ -113,7 +113,11 @@
};
struct XCOFFCsectAuxEnt32 {
- support::ubig32_t SectionLen;
+ support::ubig32_t
+ SectionOrLength; // If the symbol type is XTY_SD,XTY_CM,it contains the
+ // csect length. If the symbol type is XTY_LD, it
+ // contains the symbol table index of the containing
+ // csect. If the symbol type is XTY_ER, it contains 0.
support::ubig32_t ParameterHashIndex;
support::ubig16_t TypeChkSectNum;
uint8_t SymbolAlignmentAndType;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68650.223876.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191008/13e9d4b6/attachment.bin>
More information about the llvm-commits
mailing list