[PATCH] D49506: [ELF] gdb-index: ignore DWARFAddressRange whose SectionIndex=-1

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 18 13:15:37 PDT 2018


MaskRay created this revision.
MaskRay added a reviewer: ruiu.
Herald added subscribers: llvm-commits, JDevlieghere, arichardson, aprantl, emaste.
Herald added a reviewer: espindola.

DWARFDataExtractor::getRelocatedValue may set section index to -1


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D49506

Files:
  ELF/SyntheticSections.cpp


Index: ELF/SyntheticSections.cpp
===================================================================
--- ELF/SyntheticSections.cpp
+++ ELF/SyntheticSections.cpp
@@ -2322,6 +2322,8 @@
 
     ArrayRef<InputSectionBase *> Sections = Sec->File->getSections();
     for (DWARFAddressRange &R : Ranges) {
+      if (R.SectionIndex == UINT64_C(-1))
+        continue;
       InputSectionBase *S = Sections[R.SectionIndex];
       if (!S || S == &InputSection::Discarded || !S->Live)
         continue;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49506.156141.patch
Type: text/x-patch
Size: 495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180718/43fa1075/attachment.bin>


More information about the llvm-commits mailing list