Fix bug where SECTIONS clause does not handle compressed debug sections.
authorCary Coutant <ccoutant@gmail.com>
Thu, 11 Jun 2015 17:17:04 +0000 (10:17 -0700)
committerCary Coutant <ccoutant@gmail.com>
Thu, 11 Jun 2015 20:21:10 +0000 (13:21 -0700)
commitdd68f8fa8e2412c5c16380871d8ac5e40909aef6
tree7edf3728b35100d172f4e5af0dded1ac7cd87070
parenta3a0c39166742c9ef9bb5d87ab51320b7f62cb92
Fix bug where SECTIONS clause does not handle compressed debug sections.

When laying out .debug_* sections, we translate the names of compressed
debug sections that start with ".zdebug", but when processing input
section specs in a linker script, we do not handle the translation there.
This results in an internal error as reported in PR 17731.

gold/
PR gold/17731
* layout.cc (corresponding_uncompressed_section_name): New function.
(Layout::choose_output_section): Call it.
* layout.h (corresponding_uncompressed_section_name): New function.
* script-sections.cc (Input_section_info::set_section_name): Check
for compressed debug section (.zdebug style).
gold/ChangeLog
gold/layout.cc
gold/layout.h
gold/script-sections.cc