[PATCH] D58908: [llvm-objcopy] - SImplify `isCompressable` and fix the issue relative.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 5 00:54:46 PST 2019
grimar added inline comments.
================
Comment at: test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-header.test:7
+
+# We had a bug when llvm-objcopy did not compress normally named sections
+# that had data which started from "ZLIB". Such header is used in zlib-gnu
----------------
MaskRay wrote:
> The description may be a bit verbose. I think we can just say that non-`.zdebug_` sections whose data does not start with `"ZLIB"` should not be considered compressed.
I reduced the comment, thanks!
================
Comment at: tools/llvm-objcopy/ELF/ELFObjcopy.cpp:230
+ return false;
+ return isDebugSection(Section) && Section.Name != ".gdb_index";
}
----------------
MaskRay wrote:
> `isDebugSection(Section)` also checks `".zdebug"`. How about just using `Section.Name.startswith(".debug_")` ?
Actually yes, that would be better here I think. Applied your suggestion.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58908/new/
https://reviews.llvm.org/D58908
More information about the llvm-commits
mailing list