diff options
Diffstat (limited to 'gold/dwarf_reader.cc')
-rw-r--r-- | gold/dwarf_reader.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/dwarf_reader.cc b/gold/dwarf_reader.cc index 4062fe6..c0188fb 100644 --- a/gold/dwarf_reader.cc +++ b/gold/dwarf_reader.cc @@ -32,6 +32,7 @@ #include "reloc.h" #include "dwarf_reader.h" #include "int_encoding.h" +#include "compressed_output.h" namespace gold { @@ -80,6 +81,21 @@ Sized_dwarf_line_info<size, big_endian>::Sized_dwarf_line_info(Object* object, if (this->buffer_ == NULL) return; + section_size_type uncompressed_size = 0; + unsigned char* uncompressed_data = NULL; + if (object->section_is_compressed(debug_shndx, &uncompressed_size)) + { + uncompressed_data = new unsigned char[uncompressed_size]; + if (!decompress_input_section(this->buffer_, + this->buffer_end_ - this->buffer_, + uncompressed_data, + uncompressed_size)) + object->error(_("could not decompress section %s"), + object->section_name(debug_shndx).c_str()); + this->buffer_ = uncompressed_data; + this->buffer_end_ = this->buffer_ + uncompressed_size; + } + // Find the relocation section for ".debug_line". // We expect these for relobjs (.o's) but not dynobjs (.so's). bool got_relocs = false; |