[PATCH] D58908: [llvm-objcopy] - SImplify `isCompressable` and fix the issue relative.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 23:21:18 PST 2019
MaskRay 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
----------------
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.
================
Comment at: tools/llvm-objcopy/ELF/ELFObjcopy.cpp:230
+ return false;
+ return isDebugSection(Section) && Section.Name != ".gdb_index";
}
----------------
`isDebugSection(Section)` also checks `".zdebug"`. How about just using `Section.Name.startswith(".debug_")` ?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58908/new/
https://reviews.llvm.org/D58908
More information about the llvm-commits
mailing list