aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2013-03-21 04:52:55 +0000
committerAlan Modra <amodra@gmail.com>2013-03-21 04:52:55 +0000
commitebacd51e16144e7e88e8c010b571d94a9d7ea232 (patch)
treebd709cefa8bf2781135021d92405d3de432a8e71
parent117be58fad705e4df95c2e0bb2f3d46aa132eb20 (diff)
downloadgdb-ebacd51e16144e7e88e8c010b571d94a9d7ea232.zip
gdb-ebacd51e16144e7e88e8c010b571d94a9d7ea232.tar.gz
gdb-ebacd51e16144e7e88e8c010b571d94a9d7ea232.tar.bz2
* layout.cc (Layout::set_segment_offsets): Accept writable .text
segment when omagic.
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/layout.cc3
2 files changed, 7 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 52c2067..49ed934 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,10 @@
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
comparison warning.
* layout.cc (Layout::create_dynamic_symtab): Avoid "may be used
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;
}