* compressed_output.cc (zlib_decompress): New function.
(get_uncompressed_size): New function. (decompress_input_section): New function. * compressed_output.h (get_uncompressed_size): New function. (decompress_input_section): New function. * dwarf_reader.cc (Sized_dwarf_line_info::Sized_dwarf_line_info) Handle compressed debug sections. * layout.cc (is_compressed_debug_section): New function. (Layout::output_section_name): Map compressed section names to canonical names. * layout.h (is_compressed_debug_section): New function. (is_debug_info_section): Recognize compressed debug sections. * merge.cc: Include compressed_output.h. (Output_merge_data::do_add_input_section): Handle compressed debug sections. (Output_merge_string::do_add_input_section): Handle compressed debug sections. * object.cc: Include compressed_output.h. (Sized_relobj::Sized_relobj): Initialize new data members. (build_compressed_section_map): New function. (Sized_relobj::do_read_symbols): Handle compressed debug sections. * object.h (Object::section_is_compressed): New method. (Object::do_section_is_compressed): New method. (Sized_relobj::Compressed_section_map): New type. (Sized_relobj::do_section_is_compressed): New method. (Sized_relobj::compressed_sections_): New data member. * output.cc (Output_section::add_input_section): Handle compressed debug sections. * reloc.cc: Include compressed_output.h. (Sized_relobj::write_sections): Handle compressed debug sections.
This commit is contained in:
parent
add265ae41
commit
a2e4736229
11 changed files with 358 additions and 17 deletions
|
@ -1,6 +1,6 @@
|
|||
// compressed_output.h -- compressed output sections for gold -*- C++ -*-
|
||||
|
||||
// Copyright 2007, 2008 Free Software Foundation, Inc.
|
||||
// Copyright 2007, 2008, 2010 Free Software Foundation, Inc.
|
||||
// Written by Ian Lance Taylor <iant@google.com>.
|
||||
|
||||
// This file is part of gold.
|
||||
|
@ -37,6 +37,18 @@ namespace gold
|
|||
|
||||
class General_options;
|
||||
|
||||
// Read the compression header of a compressed debug section and return
|
||||
// the uncompressed size.
|
||||
|
||||
extern uint64_t
|
||||
get_uncompressed_size(const unsigned char*, section_size_type);
|
||||
|
||||
// Decompress a compressed debug section directly into the output file.
|
||||
|
||||
extern bool
|
||||
decompress_input_section(const unsigned char*, unsigned long, unsigned char*,
|
||||
unsigned long);
|
||||
|
||||
// This is used for a section whose data should be compressed. It is
|
||||
// a regular Output_section which computes its contents into a buffer
|
||||
// and then postprocesses it.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue