Add "volatile" keyword to "struct gdb_exception" declaration
[deliverable/binutils-gdb.git] / gold / target.h
index 3464a2ba4565ad2460ed46763cb74e5b509d59c5..415b7edcf92bdb8f29b38a2934c4c36c8a603d08 100644 (file)
@@ -1,6 +1,6 @@
 // target.h -- target support for gold   -*- C++ -*-
 
-// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012
+// Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
 // Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
@@ -61,6 +61,7 @@ class Output_data_got_base;
 class Output_section;
 class Input_objects;
 class Task;
+struct Symbol_location;
 
 // The abstract class for target specific handling.
 
@@ -237,9 +238,15 @@ class Target
   // Adjust the output file header before it is written out.  VIEW
   // points to the header in external form.  LEN is the length.
   void
-  adjust_elf_header(unsigned char* view, int len) const
+  adjust_elf_header(unsigned char* view, int len)
   { return this->do_adjust_elf_header(view, len); }
 
+  // Return address and size to plug into eh_frame FDEs associated with a PLT.
+  void
+  plt_fde_location(const Output_data* plt, unsigned char* oview,
+                  uint64_t* address, off_t* len) const
+  { return this->do_plt_fde_location(plt, oview, address, len); }
+
   // Return whether NAME is a local label name.  This is used to implement the
   // --discard-locals options.
   bool
@@ -280,6 +287,12 @@ class Target
   tls_offset_for_global(Symbol* gsym, unsigned int got_indx) const
   { return do_tls_offset_for_global(gsym, got_indx); }
 
+  // For targets that use function descriptors, if LOC is the location
+  // of a function, modify it to point at the function entry location.
+  void
+  function_location(Symbol_location* loc) const
+  { return do_function_location(loc); }
+
   // Return whether this target can use relocation types to determine
   // if a function's address is taken.
   bool
@@ -436,6 +449,11 @@ class Target
   gc_mark_symbol(Symbol_table* symtab, Symbol* sym) const
   { this->do_gc_mark_symbol(symtab, sym); }
 
+  // Return the name of the entry point symbol.
+  const char*
+  entry_symbol_name() const
+  { return this->pti_->entry_symbol_name; }
+
  protected:
   // This struct holds the constant information for a child class.  We
   // use a struct to avoid the overhead of virtual function calls for
@@ -489,6 +507,8 @@ class Target
     const char* attributes_section;
     // Vendor name of vendor attributes.
     const char* attributes_vendor;
+    // Name of the main entry point to the program.
+    const char* entry_symbol_name;
   };
 
   Target(const Target_info* pti)
@@ -528,7 +548,12 @@ class Target
   // By default, we set the EI_OSABI field if requested (in
   // Sized_target).
   virtual void
-  do_adjust_elf_header(unsigned char*, int) const = 0;
+  do_adjust_elf_header(unsigned char*, int) = 0;
+
+  // Return address and size to plug into eh_frame FDEs associated with a PLT.
+  virtual void
+  do_plt_fde_location(const Output_data* plt, unsigned char* oview,
+                     uint64_t* address, off_t* len) const;
 
   // Virtual function which may be overridden by the child class.
   virtual bool
@@ -564,6 +589,9 @@ class Target
   do_tls_offset_for_global(Symbol*, unsigned int) const
   { gold_unreachable(); }
 
+  virtual void
+  do_function_location(Symbol_location*) const = 0;
+
   // Virtual function which may be overriden by the child class.
   virtual bool
   do_can_check_for_function_pointers() const
@@ -838,7 +866,8 @@ class Sized_target : public Target
                  const unsigned char* prelocs,
                  size_t reloc_count,
                  Output_section* output_section,
-                 off_t offset_in_output_section,
+                 typename elfcpp::Elf_types<size>::Elf_Off
+                    offset_in_output_section,
                  const Relocatable_relocs*,
                  unsigned char* view,
                  typename elfcpp::Elf_types<size>::Elf_Addr view_address,
@@ -868,7 +897,8 @@ class Sized_target : public Target
                               const unsigned char* /* preloc_in */,
                               size_t /* relnum */,
                               Output_section* /* output_section */,
-                              off_t /* offset_in_output_section */,
+                              typename elfcpp::Elf_types<size>::Elf_Off
+                                 /* offset_in_output_section */,
                               unsigned char* /* view */,
                               typename elfcpp::Elf_types<size>::Elf_Addr
                                 /* view_address */,
@@ -988,7 +1018,7 @@ class Sized_target : public Target
 
   // Set the EI_OSABI field if requested.
   virtual void
-  do_adjust_elf_header(unsigned char*, int) const;
+  do_adjust_elf_header(unsigned char*, int);
 
   // Handle target specific gc actions when adding a gc reference.
   virtual void
@@ -996,6 +1026,10 @@ class Sized_target : public Target
                      Object*, unsigned int,
                      typename elfcpp::Elf_types<size>::Elf_Addr) const
   { }
+
+  virtual void
+  do_function_location(Symbol_location*) const
+  { }
 };
 
 } // End namespace gold.
This page took 0.025175 seconds and 4 git commands to generate.