diff options
author | Ian Lance Taylor <iant@google.com> | 2007-10-16 22:38:36 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-10-16 22:38:36 +0000 |
commit | 0c5e9c22aa5e70354471a6314c9c624c22719266 (patch) | |
tree | b94bce685c6afa90a8a7fe7edd88fe8e558c1219 /gold/layout.cc | |
parent | 928a4139f6eedb83ca83a58d42c2ba54ab8dd536 (diff) | |
download | gdb-0c5e9c22aa5e70354471a6314c9c624c22719266.zip gdb-0c5e9c22aa5e70354471a6314c9c624c22719266.tar.gz gdb-0c5e9c22aa5e70354471a6314c9c624c22719266.tar.bz2 |
From Craig Silverstein: implement -Ttext.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index cb9475c..4f5abac 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -817,7 +817,11 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg, // Find the PT_LOAD segments, and set their addresses and offsets // and their section's addresses and offsets. - uint64_t addr = target->text_segment_address(); + uint64_t addr; + if (options_.user_set_text_segment_address()) + addr = options_.text_segment_address(); + else + addr = target->default_text_segment_address(); off_t off = 0; bool was_readonly = false; for (Segment_list::iterator p = this->segment_list_.begin(); |