[PATCH] D38721: [ELF] - Teach LLD to report line numbers for data symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 05:07:18 PDT 2017


grimar created this revision.
Herald added a subscriber: emaste.

Currently LLD is unable to report line number when reporting duplicate
declaration of some variable.

That happens because for extracting line information we always use .debug_line section
content which describes mapping from machine instructions to source file locations,
what does not help for variables as does not describe them.

In this patch I am taking the approproate information about data symbol locations
from the .debug_info section.

It is PR34826.


https://reviews.llvm.org/D38721

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/Relocations.cpp
  ELF/SymbolTable.cpp
  test/ELF/Inputs/conflict-debug-variable.s
  test/ELF/conflict.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38721.118352.patch
Type: text/x-patch
Size: 13489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/59f06fbe/attachment.bin>


More information about the llvm-commits mailing list