mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 02:50:08 +08:00
2010-05-19 Rafael Espindola <espindola@google.com>
* script-sections.cc (Output_section_definition::allocate_to_segment): Update the phdrs_list even when the output section is NULL. * testsuite/Makefile.am: Add test. * testsuite/Makefile.in: Regenerate. * testsuite/script_test_9.cc: New. * testsuite/script_test_9.sh: New. * testsuite/script_test_9.t: New.
This commit is contained in:
@ -2169,13 +2169,16 @@ Output_section*
|
||||
Output_section_definition::allocate_to_segment(String_list** phdrs_list,
|
||||
bool* orphan)
|
||||
{
|
||||
// Update phdrs_list even if we don't have an output section. It
|
||||
// might be used by the following sections.
|
||||
if (this->phdrs_ != NULL)
|
||||
*phdrs_list = this->phdrs_;
|
||||
|
||||
if (this->output_section_ == NULL)
|
||||
return NULL;
|
||||
if ((this->output_section_->flags() & elfcpp::SHF_ALLOC) == 0)
|
||||
return NULL;
|
||||
*orphan = false;
|
||||
if (this->phdrs_ != NULL)
|
||||
*phdrs_list = this->phdrs_;
|
||||
return this->output_section_;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user