summaryrefslogtreecommitdiff
path: root/gold/merge.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-01 06:34:12 +0000
committerIan Lance Taylor <iant@google.com>2007-12-01 06:34:12 +0000
commit96803768f1845a2c5af362ea2dc6b39a147d3930 (patch)
tree1ff1ce0a11218dd449f822cfc42c17626627491b /gold/merge.cc
parentf80c84b330870d86697702c95506f127264fac3a (diff)
Compress all debug sections.
Diffstat (limited to 'gold/merge.cc')
-rw-r--r--gold/merge.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/gold/merge.cc b/gold/merge.cc
index 215bc341c0..98ea89e134 100644
--- a/gold/merge.cc
+++ b/gold/merge.cc
@@ -445,6 +445,14 @@ Output_merge_data::do_write(Output_file* of)
of->write(this->offset(), this->p_, this->len_);
}
+// Write the data to a buffer.
+
+void
+Output_merge_data::do_write_to_buffer(unsigned char* buffer)
+{
+ memcpy(buffer, this->p_, this->len_);
+}
+
// Class Output_merge_string.
// Add an input section to a merged string section.
@@ -535,6 +543,15 @@ Output_merge_string<Char_type>::do_write(Output_file* of)
this->stringpool_.write(of, this->offset());
}
+// Write a merged string section to a buffer.
+
+template<typename Char_type>
+void
+Output_merge_string<Char_type>::do_write_to_buffer(unsigned char* buffer)
+{
+ this->stringpool_.write_to_buffer(buffer, this->data_size());
+}
+
// Instantiate the templates we need.
template