* layout.cc (Layout::set_segment_offsets): Accept writable .text

segment when omagic.
This commit is contained in:
Alan Modra 2013-03-21 04:52:55 +00:00
parent 117be58fad
commit ebacd51e16
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-03-21 Alan Modra <amodra@gmail.com>
* layout.cc (Layout::set_segment_offsets): Accept writable .text
segment when omagic.
2013-03-21 Alan Modra <amodra@gmail.com>
* dwp.cc (Dwp_output_file::add_contribution): Avoid signed/unsigned

View File

@ -3353,7 +3353,8 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg,
addr = (*p)->paddr();
}
else if (parameters->options().user_set_Ttext()
&& ((*p)->flags() & elfcpp::PF_W) == 0)
&& (parameters->options().omagic()
|| ((*p)->flags() & elfcpp::PF_W) == 0))
{
are_addresses_set = true;
}