summaryrefslogtreecommitdiff
path: root/gold/target.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-08-14 03:39:03 +0000
committerAlan Modra <amodra@gmail.com>2012-08-14 03:39:03 +0000
commit921b53228fa18e00beca6b19b3aa43c23903b900 (patch)
tree58e756620d247965ed65e394bd8d40aae46253f4 /gold/target.h
parenta6f7924a8348ef6344ea114278fb2befcd3118e1 (diff)
* 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/target.h')
-rw-r--r--gold/target.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/target.h b/gold/target.h
index 81c8114e5f..19092e15a3 100644
--- a/gold/target.h
+++ b/gold/target.h
@@ -412,6 +412,15 @@ class Target
define_standard_symbols(Symbol_table* symtab, Layout* layout)
{ this->do_define_standard_symbols(symtab, layout); }
+ // Return the output section name to use given an input section
+ // name, or NULL if no target specific name mapping is required.
+ // Set *PLEN to the length of the name if returning non-NULL.
+ const char*
+ output_section_name(const Relobj* relobj,
+ const char* name,
+ size_t* plen) const
+ { return this->do_output_section_name(relobj, name, plen); }
+
protected:
// This struct holds the constant information for a child class. We
// use a struct to avoid the overhead of virtual function calls for
@@ -655,6 +664,11 @@ class Target
do_define_standard_symbols(Symbol_table*, Layout*)
{ }
+ // This may be overridden by the child class.
+ virtual const char*
+ do_output_section_name(const Relobj*, const char*, size_t*) const
+ { return NULL; }
+
private:
// The implementations of the four do_make_elf_object virtual functions are
// almost identical except for their sizes and endianness. We use a template.