[PATCH] D20272: [ELF] - Support of compressed input sections implemented.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 23 22:31:38 PDT 2016
ruiu 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)
----------------
UncompressedSize
================
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)));
+
----------------
Cast to Elf{32,64}_Chdr and access `ch_size` member instead of hard-coding the offsets.
================
Comment at: ELF/InputSection.h:44
@@ -43,1 +43,3 @@
+ SmallVector<char, 0> Unpacked;
+
----------------
I'd name this `Uncompressed`.
It needs a comment.
// If a section is compressed, this vector has uncompressed section data.
================
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;
----------------
H->sh_flags & ~SHF_GROUP & ~SHF_COMPRESSED
http://reviews.llvm.org/D20272
More information about the llvm-commits
mailing list