aboutsummaryrefslogtreecommitdiff
path: root/gold/merge.cc
diff options
context:
space:
mode:
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 75a3eee..192d6a4 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();