diff options
Diffstat (limited to 'gold/script-sections.cc')
-rw-r--r-- | gold/script-sections.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gold/script-sections.cc b/gold/script-sections.cc index 952444e..3266115 100644 --- a/gold/script-sections.cc +++ b/gold/script-sections.cc @@ -1939,14 +1939,23 @@ Output_section_definition::set_section_addresses(Symbol_table* symtab, uint64_t old_dot_value = *dot_value; uint64_t old_load_address = *load_address; - if (this->address_ == NULL) - address = *dot_value; - else + // Check for --section-start. + bool is_address_set = false; + if (this->output_section_ != NULL) + is_address_set = + parameters->options().section_start(this->output_section_->name(), + &address); + if (!is_address_set) { - Output_section* dummy; - address = this->address_->eval_with_dot(symtab, layout, true, - *dot_value, NULL, &dummy, - dot_alignment); + if (this->address_ == NULL) + address = *dot_value; + else + { + Output_section* dummy; + address = this->address_->eval_with_dot(symtab, layout, true, + *dot_value, NULL, &dummy, + dot_alignment); + } } uint64_t align; |