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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Dec 11 09:47:27 PST 2017

labath added a comment.

@davide: Any thoughts on `.yaml` as a test file suffix?

@clayborg: What do you think about my comment about GetFileSize() of compressed sections

In https://reviews.llvm.org/D40616#940408, @labath wrote:

> 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.


More information about the lldb-commits mailing list