diff options
author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2010-05-26 15:15:05 +0000 |
---|---|---|
committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2010-05-26 15:15:05 +0000 |
commit | f418727792e6e7dce38aa382db45d147bccd8ed7 (patch) | |
tree | af8d317014e25281703e97f4d866e77e95a32958 /gold | |
parent | c8ce57109cba194742fc1d0b6f953cf535571750 (diff) | |
download | gdb-f418727792e6e7dce38aa382db45d147bccd8ed7.zip gdb-f418727792e6e7dce38aa382db45d147bccd8ed7.tar.gz gdb-f418727792e6e7dce38aa382db45d147bccd8ed7.tar.bz2 |
2010-05-26 Rafael Espindola <espindola@google.com>
* script-sections.cc (Output_section_definition::set_section_addresses):
Check for --section-start.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/script-sections.cc | 23 |
2 files changed, 21 insertions, 7 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index e2b009d..899170d 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2010-05-26 Rafael Espindola <espindola@google.com> + + * script-sections.cc (Output_section_definition::set_section_addresses): + Check for --section-start. + 2010-05-26 Doug Kwan <dougkwan@google.com> * arm.cc (Arm_scan_relocatable_relocs): New class. 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; |