[PATCH] D49678: [llvm-objcopy] Adding support for compressed DWARF debug sections.
Puyan Lotfi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 31 11:25:17 PDT 2018
plotfi marked 2 inline comments as done.
plotfi added inline comments.
================
Comment at: tools/llvm-objcopy/Object.cpp:162
+ Chdr->ch_size = Sec.DecompressedSize;
+ Chdr->ch_addralign = Sec.Align;
+ Buf += sizeof(*Chdr);
----------------
plotfi wrote:
> jakehehrlich wrote:
> > You can make the alignment of this section smaller by storing the alignment of the uncompressed section as a separate field and then just using an alignment of 8 for Sec.Align in the constructor. That will help decrease the size of most fields and avoid unaligned reads/writes for Chdr for sections that have less than 8 byte alignment.
> >
> > For instance if a section had page alignment (I can't imagine that happening) you'd save up to almost a page of space by setting the alignment smaller. For debug sections I don't think it will save anything or generally even avoid unaligned reads/writes but it's my preference either way.
> So Chdr->ch_addralign = original alignment
> Sec.Align = 8
>
> ??
I made changes addressing the alignment stuff you suggested. Let me know if this is what you had in mind.
Repository:
rL LLVM
https://reviews.llvm.org/D49678
More information about the llvm-commits
mailing list