[PATCH] D82549: [AIX][XCOFF] parsing xcoff object file auxiliary header

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 14 12:50:23 PDT 2020


DiggerLin marked an inline comment as done.
DiggerLin added inline comments.


================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:530
+  PrintAuxMember32(Number, "Section number for .tdata", SecNumOfTData);
+  PrintAuxMember32(Number, "Section number for .tbss", SecNumOfTBSS);
+
----------------
DiggerLin wrote:
> jasonliu wrote:
> > hubert.reinterpretcast wrote:
> > > We should produce some warning if the auxiliary table size indicates additional content past the last field that the code understands. This is another case where I think we should also output the raw data.
> > This is marked as Done. But I don't think we are able to print additional content under current revision. But anyway, I would expect this scenario would get added in the test case (which belong to another patch).
> I think the code , print out the additional content.
> 
> if f (sizeof(XCOFFAuxiliaryHeader32) < AuxiSize) {
>     W.printBinary(
>         "!!!Warning",
>         "There are extra data beyond XCOFFAuxiliaryHeader32. Extra raw data",
>         ArrayRef<uint8_t>((const uint8_t *)(AuxHeader) +
>                               sizeof(XCOFFAuxiliaryHeader32),
>                           AuxiSize - sizeof(XCOFFAuxiliaryHeader32)));
> 
> Yes, I will test additional content in another patch.
there are already has  additional content auxiliary data in the test case 
xcoff-auxiliary-header.test

XLC64EXEC-NEXT:  !!!Warning: There are extra data beyond XCOFFAuxiliaryHeader64. Extra raw data (00 00 00 00 00 00 00 00 00 00)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82549/new/

https://reviews.llvm.org/D82549



More information about the llvm-commits mailing list