[PATCH] D38491: [ELF] Decompress debug info sections early

Shoaib Meenai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 21:33:27 PDT 2017


smeenai created this revision.
Herald added subscribers: aprantl, emaste.

When reporting a symbol conflict, LLD parses the debug info to report
source location information. Sections have not been decompressed at this
point, so if an object file contains zlib compressed debug info, LLD
ends up passing this compressed debug info to the DWARF parser, which
causes debug info parsing failures and can trigger assertions in the
parser (as the test case demonstrates).

Decompress debug sections when constructing the LLDDwarfObj to avoid
this issue. This doesn't handle GNU-style compressed debug info sections
(.zdebug_*), which at present are simply ignored by LLDDwarfObj; those
can be done in a follow-up.


https://reviews.llvm.org/D38491

Files:
  ELF/GdbIndex.cpp
  test/ELF/compressed-debug-conflict.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38491.117468.patch
Type: text/x-patch
Size: 8083 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171003/540be149/attachment.bin>


More information about the llvm-commits mailing list