diff options
author | Ian Lance Taylor <iant@google.com> | 2007-12-01 06:34:12 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-12-01 06:34:12 +0000 |
commit | 96803768f1845a2c5af362ea2dc6b39a147d3930 (patch) | |
tree | 1ff1ce0a11218dd449f822cfc42c17626627491b /gold/merge.cc | |
parent | f80c84b330870d86697702c95506f127264fac3a (diff) | |
download | gdb-96803768f1845a2c5af362ea2dc6b39a147d3930.zip gdb-96803768f1845a2c5af362ea2dc6b39a147d3930.tar.gz gdb-96803768f1845a2c5af362ea2dc6b39a147d3930.tar.bz2 |
Compress all debug sections.
Diffstat (limited to 'gold/merge.cc')
-rw-r--r-- | gold/merge.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gold/merge.cc b/gold/merge.cc index 215bc34..98ea89e 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 |