diff options
author | Cary Coutant <ccoutant@google.com> | 2013-01-07 21:36:56 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2013-01-07 21:36:56 +0000 |
commit | 3136a00eec7368aa50169e286c6139a8e56f31a9 (patch) | |
tree | b4664df55ccc337e8b36c408c3b4f5ead4121efd | |
parent | 07a8e9f0361a21ecced933a32e98a38e7b04d590 (diff) | |
download | gdb-3136a00eec7368aa50169e286c6139a8e56f31a9.zip gdb-3136a00eec7368aa50169e286c6139a8e56f31a9.tar.gz gdb-3136a00eec7368aa50169e286c6139a8e56f31a9.tar.bz2 |
gold/
PR gold/14993
* output.cc (Output_section::add_input_section): For incremental
updates, don't track input sections that are allocated from patch
space.
-rw-r--r-- | gold/ChangeLog | 7 | ||||
-rw-r--r-- | gold/output.cc | 26 |
2 files changed, 15 insertions, 18 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 47ef7e8..9d48cd0 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,10 @@ +2013-01-07 Cary Coutant <ccoutant@google.com> + + PR gold/14993 + * output.cc (Output_section::add_input_section): For incremental + updates, don't track input sections that are allocated from patch + space. + 2013-01-07 H.J. Lu <hongjiu.lu@intel.com> Ian Lance Taylor <iant@google.com> diff --git a/gold/output.cc b/gold/output.cc index f2321b7..01126a3 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -2422,7 +2422,7 @@ Output_section::add_input_section(Layout* layout, input_section_size = uncompressed_size; off_t offset_in_section; - off_t aligned_offset_in_section; + if (this->has_fixed_layout()) { // For incremental updates, find a chunk of unused space in the section. @@ -2432,17 +2432,15 @@ Output_section::add_input_section(Layout* layout, gold_fallback(_("out of patch space in section %s; " "relink with --incremental-full"), this->name()); - aligned_offset_in_section = offset_in_section; - } - else - { - offset_in_section = this->current_data_size_for_child(); - aligned_offset_in_section = align_address(offset_in_section, - addralign); - this->set_current_data_size_for_child(aligned_offset_in_section - + input_section_size); + return offset_in_section; } + offset_in_section = this->current_data_size_for_child(); + off_t aligned_offset_in_section = align_address(offset_in_section, + addralign); + this->set_current_data_size_for_child(aligned_offset_in_section + + input_section_size); + // Determine if we want to delay code-fill generation until the output // section is written. When the target is relaxing, we want to delay fill // generating to avoid adjusting them during relaxation. Also, if we are @@ -2507,14 +2505,6 @@ Output_section::add_input_section(Layout* layout, this->set_input_section_order_specified(); } } - if (this->has_fixed_layout()) - { - // For incremental updates, finalize the address and offset now. - uint64_t addr = this->address(); - isecn.set_address_and_file_offset(addr + aligned_offset_in_section, - aligned_offset_in_section, - this->offset()); - } this->input_sections_.push_back(isecn); } |