[PATCH] D20272: [ELF] - Support of compressed input sections implemented.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 02:18:21 PDT 2016
grimar added inline comments.
================
Comment at: ELF/InputSection.cpp:95
@@ +94,3 @@
+
+ size_t UnpackedSize =
+ read<size_t, E>(ELFT::Is64Bits ? (Data.data() + sizeof(Elf64_Word) * 2)
----------------
ruiu wrote:
> UncompressedSize
Done.
================
Comment at: ELF/InputSection.cpp:96-97
@@ +95,4 @@
+ size_t UnpackedSize =
+ read<size_t, E>(ELFT::Is64Bits ? (Data.data() + sizeof(Elf64_Word) * 2)
+ : (Data.data() + sizeof(Elf32_Word)));
+
----------------
ruiu wrote:
> Cast to Elf{32,64}_Chdr and access `ch_size` member instead of hard-coding the offsets.
Done.
================
Comment at: ELF/InputSection.h:44
@@ -43,1 +43,3 @@
+ SmallVector<char, 0> Unpacked;
+
----------------
ruiu wrote:
> I'd name this `Uncompressed`.
>
> It needs a comment.
>
> // If a section is compressed, this vector has uncompressed section data.
Done.
================
Comment at: ELF/Writer.cpp:622
@@ -621,2 +621,3 @@
const Elf_Shdr *H = C->getSectionHdr();
uintX_t Flags = H->sh_flags & ~SHF_GROUP;
+ Flags &= ~SHF_COMPRESSED;
----------------
ruiu wrote:
> H->sh_flags & ~SHF_GROUP & ~SHF_COMPRESSED
Done.
http://reviews.llvm.org/D20272
More information about the llvm-commits
mailing list