From Craig Silverstein: implement -Ttext.

This commit is contained in:
Ian Lance Taylor
2007-10-16 22:38:36 +00:00
parent 928a4139f6
commit 0c5e9c22aa
7 changed files with 64 additions and 31 deletions

View File

@ -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();