summaryrefslogtreecommitdiff
path: root/gold/merge.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-03-13 20:58:11 +0000
committerIan Lance Taylor <iant@google.com>2008-03-13 20:58:11 +0000
commit1d6531cfad3c386b17a44432c8d915f0147cb716 (patch)
treeaa06d3c971f940021205489831c611ed26d4db71 /gold/merge.cc
parent018f1beaa07e1ea906fde814c0f3b45b2a6f21f4 (diff)
downloadbinutils-gdb-1d6531cfad3c386b17a44432c8d915f0147cb716.tar.gz
Don't crash if we change the address of the .eh_frame section after we
find its size.
Diffstat (limited to 'gold/merge.cc')
-rw-r--r--gold/merge.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/merge.cc b/gold/merge.cc
index 75a3eeea924..192d6a408ef 100644
--- a/gold/merge.cc
+++ b/gold/merge.cc
@@ -528,7 +528,9 @@ Output_merge_string<Char_type>::finalize_merged_data()
this->add_mapping(p->object, p->shndx, p->offset, p->length, offset);
}
- // Save some memory.
+ // Save some memory. This also ensures that this function will work
+ // if called twice, as may happen if Layout::set_segment_offsets
+ // finds a better alignment.
this->merged_strings_.clear();
return this->stringpool_.get_strtab_size();