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] PR gold/18321: gold doesn't support SHF_COMPRESSED sections


+                 if (decompress_if_needed
+                     && (is_compressed
+                         || need_decompressed_section(name)))

This is going to decompress all SHF_COMPRESSED sections; the
point of this test is to put off any decompression except for
sections whose contents we'll need during Add_sections tasks.
(See the comments for need_decompressed_sections.) I think you
should leave this test as it was, and go fix
need_decompressed_section() to deal with sections whose names
don't begin with ".z".

+  Compressed_section_map* compressed_sections =
+    build_compressed_section_map<size, big_endian>(
+                                                  pshdrs,
this->shnum(), names, sd->section_names_size, this, true);

This line is indented way too far. Should be:

  Compressed_section_map* compressed_sections =
      build_compressed_section_map<size, big_endian>(
          pshdrs, this->shnum(), names, sd->section_names_size, this, true);

+  Relobj *relobj = static_cast<Relobj*>(this);

This is a dangerous cast. I'd prefer to promote the elfsize() and
is_big_endian() methods to the Object class, and provide
implementations of do_elfsize() and do_is_big_endian() in
Sized_dynobj and Sized_pluginobj.

-cary


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