[llvm] r374179 - [AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.
Jason Liu via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 9 09:19:39 PDT 2019
Author: jasonliu
Date: Wed Oct 9 09:19:39 2019
New Revision: 374179
URL: http://llvm.org/viewvc/llvm-project?rev=374179&view=rev
Log:
[AIX][XCOFF][NFC] Change the SectionLen field name of CSect Auxiliary entry to SectionOrLength.
Summary:
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.
Authored By: DiggerLin
Reviewed By: hubert.reinterpretcast
Differential Revision: https://reviews.llvm.org/D68650
Added:
llvm/trunk/D68650.diff
Modified:
llvm/trunk/include/llvm/Object/XCOFFObjectFile.h
llvm/trunk/tools/llvm-readobj/XCOFFDumper.cpp
Added: llvm/trunk/D68650.diff
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/D68650.diff?rev=374179&view=auto
==============================================================================
--- llvm/trunk/D68650.diff (added)
+++ llvm/trunk/D68650.diff Wed Oct 9 09:19:39 2019
@@ -0,0 +1,34 @@
+Index: llvm/include/llvm/Object/XCOFFObjectFile.h
+===================================================================
+--- llvm/include/llvm/Object/XCOFFObjectFile.h
++++ llvm/include/llvm/Object/XCOFFObjectFile.h
+@@ -113,7 +113,12 @@
+ };
+
+ struct XCOFFCsectAuxEnt32 {
+- support::ubig32_t SectionLen;
++ support::ubig32_t
++ SectionOrLength; // If the symbol type is XTY_SD or XTY_CM, the csect
++ // length.
++ // If the symbol type is XTY_LD, the symbol table
++ // index of the containing csect.
++ // If the symbol type is XTY_ER, 0.
+ support::ubig32_t ParameterHashIndex;
+ support::ubig16_t TypeChkSectNum;
+ uint8_t SymbolAlignmentAndType;
+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.
Modified: llvm/trunk/include/llvm/Object/XCOFFObjectFile.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/XCOFFObjectFile.h?rev=374179&r1=374178&r2=374179&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/XCOFFObjectFile.h (original)
+++ llvm/trunk/include/llvm/Object/XCOFFObjectFile.h Wed Oct 9 09:19:39 2019
@@ -113,7 +113,12 @@ struct XCOFFStringTable {
};
struct XCOFFCsectAuxEnt32 {
- support::ubig32_t SectionLen;
+ support::ubig32_t
+ SectionOrLength; // If the symbol type is XTY_SD or XTY_CM, the csect
+ // length.
+ // If the symbol type is XTY_LD, the symbol table
+ // index of the containing csect.
+ // If the symbol type is XTY_ER, 0.
support::ubig32_t ParameterHashIndex;
support::ubig16_t TypeChkSectNum;
uint8_t SymbolAlignmentAndType;
Modified: llvm/trunk/tools/llvm-readobj/XCOFFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/XCOFFDumper.cpp?rev=374179&r1=374178&r2=374179&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/XCOFFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/XCOFFDumper.cpp Wed Oct 9 09:19:39 2019
@@ -161,9 +161,9 @@ void XCOFFDumper::printCsectAuxEnt32(con
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.
More information about the llvm-commits
mailing list