mirror of
https://github.com/rui314/mold.git
synced 2024-09-11 21:17:28 +03:00
[ELF] Compress debug sections with level 1 instead of level 3
Debug sections are generally compressed pretty well with level 1, so it is. Here is the comparison in lld: https://reviews.llvm.org/D70658
This commit is contained in:
parent
42b7eb87a1
commit
3322ff6e7c
@ -35,12 +35,13 @@ static std::vector<std::string_view> split(std::string_view input) {
|
||||
|
||||
static std::vector<u8> do_compress(std::string_view input) {
|
||||
// Initialize zlib stream. Since debug info is generally compressed
|
||||
// pretty well, we chose compression level 3.
|
||||
// pretty well with lower compression levels, we chose compression
|
||||
// level 1.
|
||||
z_stream strm;
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
int r = deflateInit2(&strm, 3, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
|
||||
int r = deflateInit2(&strm, 1, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
|
||||
assert(r == Z_OK);
|
||||
|
||||
// Set an input buffer
|
||||
|
Loading…
Reference in New Issue
Block a user