We use FirstSym argument in getExtendedSymbolTableIndex to calculate
a symbol index:
&Sym - &FirstSym
Instead, we could pass the symbol index directly.
This is what this patch does, it allows to simplify another llvm-readobj API.
Paths
| Differential D88016
[llvm-readobj/libObject] - Get rid of `FirstSym` argument. NFCI. ClosedPublic Authored by grimar on Sep 21 2020, 4:09 AM.
Details Summary We use FirstSym argument in getExtendedSymbolTableIndex to calculate &Sym - &FirstSym Instead, we could pass the symbol index directly.
Diff Detail
Event TimelineComment Actions LGTM, assuming I'm not mistaken in thinking there's another patch related to this one.
This revision is now accepted and ready to land.Sep 21 2020, 5:37 AM Closed by commit rGdf3e903655e2: [llvm-readobj/libObject] - Get rid of `FirstSym` argument. NFCI. (authored by grimar). · Explain WhySep 21 2020, 6:08 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 293151 llvm/include/llvm/Object/ELF.h
llvm/tools/llvm-readobj/ELFDumper.cpp
|
This is assuming the symbol is from the .symtab symbol table. I seem to remember you are fixing that elsewhere?