PR binutils/5535
[deliverable/binutils-gdb.git] / gold / reloc.h
index 51b6143b8d4667821dd2ce8c0bbe087553a83520..39ffe4ac229eef971dc8c780d4becd899cc11147 100644 (file)
@@ -23,6 +23,7 @@
 #ifndef GOLD_RELOC_H
 #define GOLD_RELOC_H
 
+#include <vector>
 #include <byteswap.h>
 
 #include "elfcpp.h"
@@ -37,6 +38,7 @@ class Relobj;
 class Read_relocs_data;
 class Symbol;
 class Layout;
+class Output_section;
 
 template<int size>
 class Sized_symbol;
@@ -68,15 +70,18 @@ class Read_relocs : public Task
 
   // The standard Task methods.
 
-  Is_runnable_type
-  is_runnable(Workqueue*);
+  Task_token*
+  is_runnable();
 
-  Task_locker*
-  locks(Workqueue*);
+  void
+  locks(Task_locker*);
 
   void
   run(Workqueue*);
 
+  std::string
+  get_name() const;
+
  private:
   const General_options& options_;
   Symbol_table* symtab_;
@@ -103,18 +108,19 @@ class Scan_relocs : public Task
 
   // The standard Task methods.
 
-  Is_runnable_type
-  is_runnable(Workqueue*);
+  Task_token*
+  is_runnable();
 
-  Task_locker*
-  locks(Workqueue*);
+  void
+  locks(Task_locker*);
 
   void
   run(Workqueue*);
 
- private:
-  class Scan_relocs_locker;
+  std::string
+  get_name() const;
 
+ private:
   const General_options& options_;
   Symbol_table* symtab_;
   Layout* layout_;
@@ -141,18 +147,19 @@ class Relocate_task : public Task
 
   // The standard Task methods.
 
-  Is_runnable_type
-  is_runnable(Workqueue*);
+  Task_token*
+  is_runnable();
 
-  Task_locker*
-  locks(Workqueue*);
+  void
+  locks(Task_locker*);
 
   void
   run(Workqueue*);
 
- private:
-  class Relocate_locker;
+  std::string
+  get_name() const;
 
+ private:
   const General_options& options_;
   const Symbol_table* symtab_;
   const Layout* layout_;
@@ -539,12 +546,12 @@ class Copy_relocs
   // index of the section to which the reloc is being applied.
   void
   save(Symbol* sym, Relobj*, unsigned int shndx,
-       const elfcpp::Rel<size, big_endian>&);
+       Output_section* output_section, const elfcpp::Rel<size, big_endian>&);
 
   // Save a Rela against SYM for possible emission later.
   void
   save(Symbol* sym, Relobj*, unsigned int shndx,
-       const elfcpp::Rela<size, big_endian>&);
+       Output_section* output_section, const elfcpp::Rela<size, big_endian>&);
 
   // Return whether there are any relocs to emit.  This also discards
   // entries which need not be emitted.
@@ -567,9 +574,11 @@ class Copy_relocs
    public:
     Copy_reloc_entry(Symbol* sym, unsigned int reloc_type,
                     Relobj* relobj, unsigned int shndx,
+                    Output_section* output_section,
                     Address address, Addend addend)
       : sym_(sym), reloc_type_(reloc_type), relobj_(relobj),
-       shndx_(shndx), address_(address), addend_(addend)
+       shndx_(shndx), output_section_(output_section),
+       address_(address), addend_(addend)
     { }
 
     // Return whether we should emit this reloc.  If we should not
@@ -590,6 +599,7 @@ class Copy_relocs
     unsigned int reloc_type_;
     Relobj* relobj_;
     unsigned int shndx_;
+    Output_section* output_section_;
     Address address_;
     Addend addend_;
   };
@@ -641,9 +651,9 @@ class Track_relocs
   // The contents of the input object's reloc section.
   const unsigned char* prelocs_;
   // The length of the reloc section.
-  off_t len_;
+  section_size_type len_;
   // Our current position in the reloc section.
-  off_t pos_;
+  section_size_type pos_;
   // The size of the relocs in the section.
   int reloc_size_;
 };
This page took 0.026627 seconds and 4 git commands to generate.