[PATCH] D26070: [ELF] Fix fetching source line, when file has multiple "AX" sections

Eugene Leviant via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 28 06:03:31 PDT 2016


evgeny777 created this revision.
evgeny777 added reviewers: ruiu, rafael.
evgeny777 added subscribers: grimar, ikudrin, llvm-commits.
evgeny777 set the repository for this revision to rL LLVM.
evgeny777 added a project: lld.

Very often object file would have multiple .text.* sections instead of one. This happens if you have comdat groups (use C++ templates) or compile C/C++ source 
using -ffunction-sections compiler argument. In this case LLVM DWARF parser needs help fetching source line from .debug_line section, because it is not possible
to distinguish input section given its address (in ELF object file all sections have zero VA).

This patch implements DWARF parser LoadedObjectInfo interface to return fake VA for each section, which is equal to section file offset.


Repository:
  rL LLVM

https://reviews.llvm.org/D26070

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  ELF/InputSection.cpp
  ELF/InputSection.h
  ELF/Relocations.cpp
  test/ELF/Inputs/undef-debug.s
  test/ELF/undef.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D26070.76181.patch
Type: text/x-patch
Size: 6356 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161028/74af023a/attachment.bin>


More information about the llvm-commits mailing list