* elf-bfd.h (struct elf_obj_tdata): Move find_line_info, local_stubs,
[binutils-gdb.git] / gold / object.h
index a507204d2b782ba6baac43d91e81841d11039c8c..01c3c6fe2fbfe47a0f7bee08b87228fb5c46d6c0 100644 (file)
@@ -1224,6 +1224,16 @@ class Relobj : public Object
   do_get_incremental_reloc_count(unsigned int symndx) const
   { return this->reloc_counts_[symndx]; }
 
+  // Return the word size of the object file.
+  int
+  elfsize() const
+  { return this->do_elfsize(); }
+
+  // Return TRUE if this is a big-endian object file.
+  bool
+  is_big_endian() const
+  { return this->do_is_big_endian(); }
+
  protected:
   // The output section to be used for each input section, indexed by
   // the input section number.  The output section is NULL if the
@@ -1386,6 +1396,16 @@ class Relobj : public Object
     return this->reloc_bases_[symndx] + counter;
   }
 
+  // Return the word size of the object file--
+  // implemented by child class.
+  virtual int
+  do_elfsize() const = 0;
+
+  // Return TRUE if this is a big-endian object file--
+  // implemented by child class.
+  virtual bool
+  do_is_big_endian() const = 0;
+
  private:
   // Mapping from input sections to output section.
   Output_sections output_sections_;
@@ -1963,6 +1983,16 @@ class Sized_relobj : public Relobj
       }
   }
 
+  // Return the word size of the object file.
+  virtual int
+  do_elfsize() const
+  { return size; }
+
+  // Return TRUE if this is a big-endian object file.
+  virtual bool
+  do_is_big_endian() const
+  { return big_endian; }
+
  private:
   // The GOT offsets of local symbols. This map also stores GOT offsets
   // for tp-relative offsets for TLS symbols.
@@ -2112,6 +2142,12 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
   void
   set_local_plt_offset(unsigned int symndx, unsigned int plt_offset);
 
+  // Adjust this local symbol value.  Return false if the symbol
+  // should be discarded from the output file.
+  bool
+  adjust_local_symbol(Symbol_value<size>* lv) const
+  { return this->do_adjust_local_symbol(lv); }
+
   // Return the name of the symbol that spans the given offset in the
   // specified section in this object.  This is used only for error
   // messages and is not particularly efficient.
@@ -2381,6 +2417,12 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
                       const unsigned char* pshdrs, Output_file* of,
                       Views* pviews);
 
+  // Adjust this local symbol value.  Return false if the symbol
+  // should be discarded from the output file.
+  virtual bool
+  do_adjust_local_symbol(Symbol_value<size>*) const
+  { return true; }
+
   // Allow a child to set output local symbol count.
   void
   set_output_local_symbol_count(unsigned int value)