[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:46:13 PDT 2020


DiggerLin marked 2 inline comments 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);
+
----------------
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.


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