PR gold/12804
authorCary Coutant <ccoutant@google.com>
Thu, 9 Jun 2011 18:18:44 +0000 (18:18 +0000)
committerCary Coutant <ccoutant@google.com>
Thu, 9 Jun 2011 18:18:44 +0000 (18:18 +0000)
* gold/gold.cc (queue_initial_tasks): Warn if --incremental is
used with --compress-debug-sections.
* gold/object.cc (Sized_relobj_file::do_layout): Report
uncompressed size of compressed input sections.

gold/ChangeLog
gold/gold.cc
gold/object.cc

index 15b0b0b273fe5936cabb8e88aba8da7951eabec2..5c705bf9b3efa0ded416a5f733e8b7dbe78a8a93 100644 (file)
@@ -1,3 +1,11 @@
+2011-06-09  Cary Coutant  <ccoutant@google.com>
+
+       PR gold/12804
+       * gold/gold.cc (queue_initial_tasks): Warn if --incremental is
+       used with --compress-debug-sections.
+       * gold/object.cc (Sized_relobj_file::do_layout): Report
+       uncompressed size of compressed input sections.
+
 2011-06-08  Cary Coutant  <ccoutant@google.com>
 
        PR gold/12804
index 95c226c5dd56a58b4840ba1b4c98c474820597fd..f68ba3e71f170748b8343be6893264ee8a84a532 100644 (file)
@@ -200,6 +200,9 @@ queue_initial_tasks(const General_options& options,
        gold_error(_("incremental linking is incompatible with --icf"));
       if (options.has_plugins())
        gold_error(_("incremental linking is incompatible with --plugin"));
+      if (strcmp(options.compress_debug_sections(), "none") != 0)
+       gold_error(_("incremental linking is incompatible with "
+                    "--compress-debug-sections"));
 
       if (parameters->incremental_update())
        {
index b14c85db87afee9e02de5932c74b470ec5977299..b51cbfee5d36d827f3bca69cd95b49f4f5d3aca0 100644 (file)
@@ -1299,8 +1299,13 @@ Sized_relobj_file<size, big_endian>::do_layout(Symbol_table* symtab,
              && (shdr.get_sh_type() == elfcpp::SHT_PROGBITS
                  || shdr.get_sh_type() == elfcpp::SHT_NOBITS
                  || shdr.get_sh_type() == elfcpp::SHT_NOTE))
-           incremental_inputs->report_input_section(this, i, name,
-                                                    shdr.get_sh_size());
+           {
+             off_t sh_size = shdr.get_sh_size();
+             section_size_type uncompressed_size;
+             if (this->section_is_compressed(i, &uncompressed_size))
+               sh_size = uncompressed_size;
+             incremental_inputs->report_input_section(this, i, name, sh_size);
+           }
 
           if (discard)
             {