summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/gold/target.h
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/gold/target.h')
-rw-r--r--binutils-2.25/gold/target.h62
1 files changed, 60 insertions, 2 deletions
diff --git a/binutils-2.25/gold/target.h b/binutils-2.25/gold/target.h
index 415b7edc..e3805910 100644
--- a/binutils-2.25/gold/target.h
+++ b/binutils-2.25/gold/target.h
@@ -1,7 +1,6 @@
// target.h -- target support for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
-// Free Software Foundation, Inc.
+// Copyright (C) 2006-2014 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -37,6 +36,7 @@
#include "elfcpp.h"
#include "options.h"
#include "parameters.h"
+#include "stringpool.h"
#include "debug.h"
namespace gold
@@ -62,6 +62,7 @@ class Output_section;
class Input_objects;
class Task;
struct Symbol_location;
+class Versions;
// The abstract class for target specific handling.
@@ -454,6 +455,36 @@ class Target
entry_symbol_name() const
{ return this->pti_->entry_symbol_name; }
+ // Whether the target has a custom set_dynsym_indexes method.
+ bool
+ has_custom_set_dynsym_indexes() const
+ { return this->do_has_custom_set_dynsym_indexes(); }
+
+ // Custom set_dynsym_indexes method for a target.
+ unsigned int
+ set_dynsym_indexes(std::vector<Symbol*>* dyn_symbols, unsigned int index,
+ std::vector<Symbol*>* syms, Stringpool* dynpool,
+ Versions* versions, Symbol_table* symtab) const
+ {
+ return this->do_set_dynsym_indexes(dyn_symbols, index, syms, dynpool,
+ versions, symtab);
+ }
+
+ // Get the custom dynamic tag value.
+ unsigned int
+ dynamic_tag_custom_value(elfcpp::DT tag) const
+ { return this->do_dynamic_tag_custom_value(tag); }
+
+ // Adjust the value written to the dynamic symbol table.
+ void
+ adjust_dyn_symbol(const Symbol* sym, unsigned char* view) const
+ { this->do_adjust_dyn_symbol(sym, view); }
+
+ // Return whether to include the section in the link.
+ bool
+ should_include_section(elfcpp::Elf_Word sh_type) const
+ { return this->do_should_include_section(sh_type); }
+
protected:
// This struct holds the constant information for a child class. We
// use a struct to avoid the overhead of virtual function calls for
@@ -725,6 +756,33 @@ class Target
do_gc_mark_symbol(Symbol_table*, Symbol*) const
{ }
+ // This may be overridden by the child class.
+ virtual bool
+ do_has_custom_set_dynsym_indexes() const
+ { return false; }
+
+ // This may be overridden by the child class.
+ virtual unsigned int
+ do_set_dynsym_indexes(std::vector<Symbol*>*, unsigned int,
+ std::vector<Symbol*>*, Stringpool*, Versions*,
+ Symbol_table*) const
+ { gold_unreachable(); }
+
+ // This may be overridden by the child class.
+ virtual unsigned int
+ do_dynamic_tag_custom_value(elfcpp::DT) const
+ { gold_unreachable(); }
+
+ // This may be overridden by the child class.
+ virtual void
+ do_adjust_dyn_symbol(const Symbol*, unsigned char*) const
+ { }
+
+ // This may be overridden by the child class.
+ virtual bool
+ do_should_include_section(elfcpp::Elf_Word) const
+ { return true; }
+
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.