[gold][PATCH] Extend --compress-debug-sections in gold
Cary Coutant
ccoutant@gmail.com
Mon Jun 1 23:04:00 GMT 2015
+ 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
More information about the Binutils
mailing list