diff options
author | Alan Modra <amodra@gmail.com> | 2012-08-14 03:39:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-08-14 03:39:03 +0000 |
commit | 921b53228fa18e00beca6b19b3aa43c23903b900 (patch) | |
tree | 58e756620d247965ed65e394bd8d40aae46253f4 /gold/layout.cc | |
parent | a6f7924a8348ef6344ea114278fb2befcd3118e1 (diff) | |
download | gdb-921b53228fa18e00beca6b19b3aa43c23903b900.zip gdb-921b53228fa18e00beca6b19b3aa43c23903b900.tar.gz gdb-921b53228fa18e00beca6b19b3aa43c23903b900.tar.bz2 |
* target.h (Target::output_section_name): New function.
(Target::do_output_section_name): New function.
* layout.cc (Layout::choose_output_section): Call the above.
* powerpc.cc (Target_powerpc::do_output_section_name): New function.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index d597fa6..006afef 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -939,7 +939,12 @@ Layout::choose_output_section(const Relobj* relobj, const char* name, if (is_input_section && !this->script_options_->saw_sections_clause() && !parameters->options().relocatable()) - name = Layout::output_section_name(relobj, name, &len); + { + const char *orig_name = name; + name = parameters->target().output_section_name(relobj, name, &len); + if (name == NULL) + name = Layout::output_section_name(relobj, orig_name, &len); + } Stringpool::Key name_key; name = this->namepool_.add_with_length(name, len, true, &name_key); |