From: Cary Coutant Date: Thu, 9 Jun 2011 18:18:44 +0000 (+0000) Subject: PR gold/12804 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fb3a1c35a8a796104f36e61ea465e94f27e2db8;p=binutils-gdb.git 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. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 15b0b0b273f..5c705bf9b3e 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2011-06-09 Cary Coutant + + 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 PR gold/12804 diff --git a/gold/gold.cc b/gold/gold.cc index 95c226c5dd5..f68ba3e71f1 100644 --- a/gold/gold.cc +++ b/gold/gold.cc @@ -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()) { diff --git a/gold/object.cc b/gold/object.cc index b14c85db87a..b51cbfee5d3 100644 --- a/gold/object.cc +++ b/gold/object.cc @@ -1299,8 +1299,13 @@ Sized_relobj_file::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) {