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:
parent
28d3cf859d
commit
d103a984a7
7 changed files with 124 additions and 3 deletions
|
@ -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_;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue