This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gold][PATCH] Extend --compress-debug-sections in gold


+  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]