This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold][patch] Add support for reading compressed debug sections


This patch adds gold support for reading compressed debug sections
(generated by the new --compress-debug-sections option in gas).

This has been only minimally tested on x86_64, so I'm not looking for
approval to commit just yet, but I wanted to make it available for
review now. I'll be doing more testing tomorrow.

Is it OK to add test cases to the gold testsuite that depend on the
new functionality in gas? (I'd think so, given that the gold testsuite
requires as-new in the build tree.) If so, I'll add a test case and
resend the patch.

-cary

        * 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.
        * 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.

Attachment: gold-compress-debug-patch.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]