Refactor Sized_relobj_file::do_relocate_sections.
[deliverable/binutils-gdb.git] / gold / object.h
index 6cb82c7633842ba7fee82cc62581dfbbffe7bc3a..508e79cb3c07e6abc8cd28891c8f0bf80e32b0b1 100644 (file)
@@ -1,6 +1,6 @@
 // object.h -- support for an object file for linking in gold  -*- C++ -*-
 
-// Copyright (C) 2006-2015 Free Software Foundation, Inc.
+// Copyright (C) 2006-2017 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -845,7 +845,7 @@ class Object
   { return this->do_get_incremental_reloc_count(symndx); }
 
   // Return the output view for section SHNDX.
-  const unsigned char*
+  unsigned char*
   get_output_view(unsigned int shndx, section_size_type* plen) const
   { return this->do_get_output_view(shndx, plen); }
 
@@ -1035,7 +1035,7 @@ class Object
   { gold_unreachable(); }
 
   // Return the output view for a section.
-  virtual const unsigned char*
+  virtual unsigned char*
   do_get_output_view(unsigned int, section_size_type*) const
   { gold_unreachable(); }
 
@@ -2562,6 +2562,13 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
                       const unsigned char* pshdrs, Output_file* of,
                       Views* pviews);
 
+  // Relocate section data for a range of sections.
+  void
+  relocate_section_range(const Symbol_table* symtab, const Layout* layout,
+                        const unsigned char* pshdrs, Output_file* of,
+                        Views* pviews, unsigned int start_shndx,
+                        unsigned int end_shndx);
+
   // Adjust this local symbol value.  Return false if the symbol
   // should be discarded from the output file.
   virtual bool
@@ -2574,7 +2581,7 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
   { this->output_local_symbol_count_ = value; }
 
   // Return the output view for a section.
-  const unsigned char*
+  unsigned char*
   do_get_output_view(unsigned int, section_size_type*) const;
 
  private:
@@ -2710,7 +2717,8 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
                     unsigned int sh_type, unsigned int shndx,
                     const unsigned char* prelocs, size_t reloc_count,
                     unsigned char* view, section_size_type view_size,
-                    Reloc_symbol_changes** reloc_map);
+                    Reloc_symbol_changes** reloc_map,
+                    const Sized_target<size, big_endian>* target);
 
   template<int sh_type>
   void
@@ -2718,7 +2726,8 @@ class Sized_relobj_file : public Sized_relobj<size, big_endian>
                             unsigned int shndx, const unsigned char* prelocs,
                             size_t reloc_count, unsigned char* view,
                             section_size_type view_size,
-                            Reloc_symbol_changes** reloc_map);
+                            Reloc_symbol_changes** reloc_map,
+                            const Sized_target<size, big_endian>* target);
 
   // Find all functions in a section.
   void
This page took 0.024076 seconds and 4 git commands to generate.