Fix crash when processing merge section with entsize of 0.
2015-02-04 Peter Collingbourne <pcc@google.com> Cary Coutant <ccoutant@google.com> gold/ * output.cc (Output_section::add_merge_input_section): Do not attempt to merge sections with an entsize of 0.
This commit is contained in:
parent
5b07cd848d
commit
2c7b626cee
@ -1,3 +1,9 @@
|
||||
2015-02-04 Peter Collingbourne <pcc@google.com>
|
||||
Cary Coutant <ccoutant@google.com>
|
||||
|
||||
* output.cc (Output_section::add_merge_input_section): Do not
|
||||
attempt to merge sections with an entsize of 0.
|
||||
|
||||
2015-02-02 Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
* attributes.h (class Output_attributes_section_data ): Add
|
||||
|
@ -2636,6 +2636,10 @@ Output_section::add_merge_input_section(Relobj* object, unsigned int shndx,
|
||||
uint64_t addralign,
|
||||
bool keeps_input_sections)
|
||||
{
|
||||
// We cannot merge sections with entsize == 0.
|
||||
if (entsize == 0)
|
||||
return false;
|
||||
|
||||
bool is_string = (flags & elfcpp::SHF_STRINGS) != 0;
|
||||
|
||||
// We cannot restore merged input section states.
|
||||
|
Loading…
x
Reference in New Issue
Block a user