* elf64-ppc.c (dec_dynrel_count): Don't error when elf_gc_sweep_symbol
[external/binutils.git] / gold / copy-relocs.h
index b7d0f5f..d1e2323 100644 (file)
@@ -65,7 +65,8 @@ class Copy_relocs
   // will wind up.  REL is the reloc itself.  The Output_data_reloc
   // section is where the dynamic relocs are put.
   void
-  copy_reloc(Symbol_table*, Layout*, Sized_symbol<size>* sym, Relobj* object,
+  copy_reloc(Symbol_table*, Layout*, Sized_symbol<size>* sym,
+             Sized_relobj_file<size, big_endian>* object,
             unsigned int shndx, Output_section* output_section,
             const Reloc& rel,
             Output_data_reloc<sh_type, true, size, big_endian>*);
@@ -80,6 +81,12 @@ class Copy_relocs
   void
   emit(Output_data_reloc<sh_type, true, size, big_endian>*);
 
+  // Emit a COPY reloc.
+  void
+  emit_copy_reloc(Symbol_table*, Sized_symbol<size>*,
+                 Output_data*, off_t,
+                 Output_data_reloc<sh_type, true, size, big_endian>*);
+
  private:
   typedef typename elfcpp::Elf_types<size>::Elf_Addr Address;
   typedef typename elfcpp::Elf_types<size>::Elf_Addr Addend;
@@ -91,7 +98,8 @@ class Copy_relocs
   {
    public:
     Copy_reloc_entry(Symbol* sym, unsigned int reloc_type,
-                    Relobj* relobj, unsigned int shndx,
+                    Sized_relobj_file<size, big_endian>* relobj,
+                     unsigned int shndx,
                     Output_section* output_section,
                     Address address, Addend addend)
       : sym_(sym), reloc_type_(reloc_type), relobj_(relobj),
@@ -108,7 +116,7 @@ class Copy_relocs
    private:
     Symbol* sym_;
     unsigned int reloc_type_;
-    Relobj* relobj_;
+    Sized_relobj_file<size, big_endian>* relobj_;
     unsigned int shndx_;
     Output_section* output_section_;
     Address address_;
@@ -120,23 +128,19 @@ class Copy_relocs
 
   // Return whether we need a COPY reloc.
   bool
-  need_copy_reloc(Sized_symbol<size>* gsym, Relobj* object,
+  need_copy_reloc(Sized_symbol<size>* gsym,
+                  Sized_relobj_file<size, big_endian>* object,
                  unsigned int shndx) const;
 
-  // Emit a COPY reloc.
+  // Make a new COPY reloc and emit it.
   void
-  emit_copy_reloc(Symbol_table*, Layout*, Sized_symbol<size>*,
+  make_copy_reloc(Symbol_table*, Layout*, Sized_symbol<size>*,
                  Output_data_reloc<sh_type, true, size, big_endian>*);
 
-  // Add a COPY reloc to the dynamic reloc section.
-  void
-  add_copy_reloc(Symbol*, section_size_type,
-                Output_data_reloc<sh_type, true, size, big_endian>*);
-
   // Save a reloc against SYM for possible emission later.
   void
-  save(Symbol*, Relobj*, unsigned int shndx, Output_section*,
-       const Reloc& rel);
+  save(Symbol*, Sized_relobj_file<size, big_endian>*, unsigned int shndx,
+       Output_section*, const Reloc& rel);
 
   // The target specific relocation type of the COPY relocation.
   const unsigned int copy_reloc_type_;