[PATCH] D65240: [XCOFF][AIX] Generate symbol table entries with llvm-readobj
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 10:01:53 PDT 2019
hubert.reinterpretcast added a comment.
Looking through this latest version still (this is a largish patch).
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:310
+ StatAuxEntPtr =
+ reinterpret_cast<const XCOFFSectAuxEntForStat *>(SymbolEntPtr + 1);
+ printSectAuxEntForStat(StatAuxEntPtr);
----------------
jasonliu wrote:
> hubert.reinterpretcast wrote:
> > This is unsafe. There is no statement I could find indicating that such an auxiliary entry is required, and `xlc` will generate such symbol table entries with no auxiliary entry.
> >
> > ```
> > [16] m 0x00000094 .data 1 unamex _$STATIC
> > [17] a4 0x00000004 0 0 SD RW 0 0
> > [18] m 0x00000094 .data 0 static x
> > ```
> We have
>
> ```
> if (NumberOfAuxEntries == 0)
> return;
> ```
>
> before this switch statement. If there is no aux entry, we would exit already before getting here.
Ah, yes. As a further consideration, I think we should do something about having more than one auxiliary entry here.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65240/new/
https://reviews.llvm.org/D65240
More information about the llvm-commits
mailing list