This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold][PATCH] Extend --compress-debug-sections in gold
- From: Cary Coutant <ccoutant at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Mon, 1 Jun 2015 16:04:31 -0700
- Subject: Re: [gold][PATCH] Extend --compress-debug-sections in gold
- Authentication-results: sourceware.org; auth=none
- References: <20150415120632 dot GA19453 at gmail dot com> <CAJimCsELES3vzHT9TPSfuYZqqruadRWPWxJ8OQdfB0CgZ=pbLg at mail dot gmail dot com> <CAMe9rOoNqOzC7TSUvrLb6ogbkNcBamAR2dxJWB9K2NfzaSw8kg at mail dot gmail dot com>
+ enum { none, zlib, gnu_zlib, gabi_zlib } compress;
"zlib" is just a placeholder for whatever the default is,
which for now is gnu_zlib. Leave it out of this enum...
+ int compression_header_size = 12;
+ const int size = parameters->target().get_size();
if (strcmp(this->options_->compress_debug_sections(), "zlib") == 0)
- success = zlib_compress(uncompressed_data, uncompressed_size,
- &this->data_, &compressed_size);
+ compress = zlib;
... and just set compress to gnu_zlib here. (Later, we can change this
to gabi_zlib.)
+ // Clear the SHF_COMPRESSED bit.
+ flags &= ~elfcpp::SHF_COMPRESSED;
Is this necessary? Your other patch explicitly clears the bit when
making new output sections. The only way it should ever be set is
by passing through the gabi_zlib path above.
-cary