aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 4c48c3c..8b88dea 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -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;
}