aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-12-31 05:43:29 +0000
committerIan Lance Taylor <ian@airs.com>2009-12-31 05:43:29 +0000
commit403a15dd3b16ecce8d632e82b6c6cd821cfaff0d (patch)
tree58923efe85b891c8d257bcdbc345bb96a22e35df /gold/layout.cc
parenteda294df6d71e405810e6b56e2bab2bff91a1799 (diff)
downloadgdb-403a15dd3b16ecce8d632e82b6c6cd821cfaff0d.zip
gdb-403a15dd3b16ecce8d632e82b6c6cd821cfaff0d.tar.gz
gdb-403a15dd3b16ecce8d632e82b6c6cd821cfaff0d.tar.bz2
PR 10979
* layout.cc (Layout::relaxation_loop_body): If -Ttext was used, don't put the file header and segment headers in the text segment.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r--gold/layout.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 8bbeebe..c633d7b 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -1482,6 +1482,12 @@ Layout::relaxation_loop_body(
!= General_options::OBJECT_FORMAT_ELF)
load_seg = NULL;
+ // If the user set the address of the text segment, that may not be
+ // compatible with putting the segment headers and file headers into
+ // that segment.
+ if (parameters->options().user_set_Ttext())
+ load_seg = NULL;
+
gold_assert(phdr_seg == NULL
|| load_seg != NULL
|| this->script_options_->saw_sections_clause());