[PATCH] D67053: [LLD] [COFF] Resolve source locations for undefined references using dwarf

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 1 14:35:13 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: ruiu, rnk, ychen.
Herald added subscribers: llvm-commits, aprantl, mgorny.
Herald added a reviewer: jdoerfert.
Herald added a project: LLVM.

This fixes PR42407.

Instead of using dwarf classes directly like the ELF linker, use the high level Symbolizer API for resolving source locations. This uses the `symbolizeCode` method for now, but should it maybe use `symbolizeInlinedCode` instead (does anybody know what the difference is?). Currently only `symbolizeCode` exposes an API that takes an ObjectFile, but that can easily be provided for `symbolizeInlinedCode` as well if needed.

Should the LLVMSymbolizer object be kept around somewhere (a std::unique_ptr in config, or somewhere else?) between calls to this, to potentially speed up later calls if they happen to be for the same object file? (The class has some sort of internal cache for object files passed to it.)


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D67053

Files:
  COFF/CMakeLists.txt
  COFF/SymbolTable.cpp
  test/COFF/undefined-symbol-dwarf.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67053.218274.patch
Type: text/x-patch
Size: 17916 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190901/0cf91e93/attachment.bin>


More information about the llvm-commits mailing list