diff options
author | Cary Coutant <ccoutant@gmail.com> | 2015-06-11 10:17:04 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2015-06-11 13:21:10 -0700 |
commit | dd68f8fa8e2412c5c16380871d8ac5e40909aef6 (patch) | |
tree | 7edf3728b35100d172f4e5af0dded1ac7cd87070 /gold/script-sections.cc | |
parent | a3a0c39166742c9ef9bb5d87ab51320b7f62cb92 (diff) | |
download | gdb-dd68f8fa8e2412c5c16380871d8ac5e40909aef6.zip gdb-dd68f8fa8e2412c5c16380871d8ac5e40909aef6.tar.gz gdb-dd68f8fa8e2412c5c16380871d8ac5e40909aef6.tar.bz2 |
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).
Diffstat (limited to 'gold/script-sections.cc')
-rw-r--r-- | gold/script-sections.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/script-sections.cc b/gold/script-sections.cc index 08c31e9..3e377aa 100644 --- a/gold/script-sections.cc +++ b/gold/script-sections.cc @@ -1457,7 +1457,12 @@ class Input_section_info // Set the section name. void set_section_name(const std::string name) - { this->section_name_ = name; } + { + if (is_compressed_debug_section(name.c_str())) + this->section_name_ = corresponding_uncompressed_section_name(name); + else + this->section_name_ = name; + } // Return the section size. uint64_t |