Fix buglet in last patch.
[deliverable/binutils-gdb.git] / gold / symtab.h
index 9c7fb0935c747bb921a68a25eb0dcfd8bfd65036..786e5cb5a8019264433f1769784d3302c494c88e 100644 (file)
@@ -541,19 +541,6 @@ class Symbol
   set_is_copied_from_dynobj()
   { this->is_copied_from_dynobj_ = true; }
 
-  // Mark this symbol as needing its value written to the GOT even when
-  // the value is subject to dynamic relocation (e.g., when the target
-  // uses a RELATIVE relocation for the GOT entry).
-  void
-  set_needs_value_in_got()
-  { this->needs_value_in_got_ = true; }
-
-  // Return whether this symbol needs its value written to the GOT even
-  // when the value is subject to dynamic relocation.
-  bool
-  needs_value_in_got() const
-  { return this->needs_value_in_got_; }
-
  protected:
   // Instances of this class should always be created at a specific
   // size.
@@ -730,9 +717,6 @@ class Symbol
   // True if we are using a COPY reloc for this symbol, so that the
   // real definition lives in a dynamic object.
   bool is_copied_from_dynobj_ : 1;
-  // True if the static value should be written to the GOT even
-  // when the final value is subject to dynamic relocation.
-  bool needs_value_in_got_ : 1;
 };
 
 // The parts of a symbol which are size specific.  Using a template
@@ -921,7 +905,7 @@ class Warnings
   // For each symbol for which we should give a warning, make a note
   // on the symbol.
   void
-  note_warnings(Symbol_table* symtab);
+  note_warnings(Symbol_table* symtab, const Task*);
 
   // Issue a warning for a reference to SYM at RELINFO's location.
   template<int size, bool big_endian>
@@ -955,7 +939,7 @@ class Warnings
     }
 
     void
-    set_text(const char* t, off_t l)
+    set_text(const char* t, section_size_type l)
     { this->text.assign(t, l); }
   };
 
@@ -971,7 +955,10 @@ class Warnings
 class Symbol_table
 {
  public:
-  Symbol_table();
+  // COUNT is an estimate of how many symbosl will be inserted in the
+  // symbol table.  It's ok to put 0 if you don't know; a correct
+  // guess will just save some CPU by reducing hashtable resizes.
+  Symbol_table(unsigned int count);
 
   ~Symbol_table();
 
@@ -1041,7 +1028,8 @@ class Symbol_table
   template<int size>
   void
   define_with_copy_reloc(const Target*, Sized_symbol<size>* sym,
-                        Output_data* posd, uint64_t value);
+                        Output_data* posd,
+                        typename elfcpp::Elf_types<size>::Elf_Addr);
 
   // Look up a symbol.
   Symbol*
@@ -1091,7 +1079,7 @@ class Symbol_table
   // Check candidate_odr_violations_ to find symbols with the same name
   // but apparently different definitions (different source-file/line-no).
   void
-  detect_odr_violations(const char* output_file_name) const;
+  detect_odr_violations(const Task*, const char* output_file_name) const;
 
   // SYM is defined using a COPY reloc.  Return the dynamic object
   // where the original definition was found.
@@ -1115,7 +1103,7 @@ class Symbol_table
   // symbol, and DYNCOUNT is the number of global dynamic symbols.
   // This records the parameters, and returns the new file offset.
   off_t
-  finalize(unsigned int index, off_t off, off_t dynoff,
+  finalize(const Task*, unsigned int index, off_t off, off_t dynoff,
           size_t dyn_global_index, size_t dyncount, Stringpool* pool);
 
   // Write out the global symbols.
@@ -1127,6 +1115,10 @@ class Symbol_table
   void
   write_section_symbol(const Output_section*, Output_file*, off_t) const;
 
+  // Dump statistical information to stderr.
+  void
+  print_stats() const;
+
  private:
   Symbol_table(const Symbol_table&);
   Symbol_table& operator=(const Symbol_table&);
This page took 0.025085 seconds and 4 git commands to generate.