[Lldb-commits] [PATCH] D40616: ObjectFileELF: Add support for compressed sections

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 30 06:02:52 PST 2017


labath updated this revision to Diff 124926.
labath added a comment.

This rewrites the test in terms on the new lldb-test utility. It should be applied on top of https://reviews.llvm.org/D40636.

While doing that, I noticed a discrepancy in the data presented by the object
file interface -- for GetFileSize(), it would return the compressed size, but,
when reading the data, it would return the decompressed size. This seemed odd
and unwanted.

So now I fetch the decompressed size when constructing the Section object, and
make sure GetFileSize result matches what the GetSectionData returns. This is
slightly odd as well, because now if someone looks at individual section file
offsets and sizes, it will seem that multiple sections overlap. While
unfortunate, this is a situation that can arise in without the presence of
compressed sections (no linker will produce a file like that, but you can
certainly hand-craft one), and our elf parser will hapily accept these files.


https://reviews.llvm.org/D40616

Files:
  lit/CMakeLists.txt
  lit/Modules/compressed-sections.yaml
  lit/Modules/lit.local.cfg
  lit/lit.cfg
  lit/lit.site.cfg.in
  source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
  source/Plugins/ObjectFile/ELF/ObjectFileELF.h
  tools/lldb-test/lldb-test.cpp
  unittests/ObjectFile/ELF/TestObjectFileELF.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40616.124926.patch
Type: text/x-patch
Size: 10064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171130/4b00913d/attachment.bin>


More information about the lldb-commits mailing list