[PATCH] D56140: [llvm-readobj] [COFF] Print the symbol index for relocations

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 28 23:44:17 PST 2018


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


================
Comment at: include/llvm/Object/COFF.h:438
   const coff_symbol32 *CS32 = nullptr;
+  size_t Index = 0;
 };
----------------
ruiu wrote:
> Instead of storing an index as a member, can you compute it when you need it from the offset from the beginning of a symbol table?
Yes, that'd be possible, but COFFSymbolRef doesn't have a reference to either the start of the symbol table or the surrounding COFFObjectFile, so it'd have to be a getIndexOf(COFFSymbolRef) member in COFFObjectFile in that case.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D56140





More information about the llvm-commits mailing list