elfcpp/ChangeLog:
[deliverable/binutils-gdb.git] / gold / symtab.h
index 4e5b7b05ab95db4dc02fe3bb6a1cc811008f7d63..8ccbca9a4107398876bdf3f2e0e4fdacd7daf923 100644 (file)
@@ -409,6 +409,11 @@ class Symbol
   set_got_offset(unsigned int got_type, unsigned int got_offset)
   { this->got_offsets_.set_offset(got_type, got_offset); }
 
+  // Return the GOT offset list.
+  const Got_offset_list*
+  got_offset_list() const
+  { return this->got_offsets_.get_list(); }
+
   // Return whether this symbol has an entry in the PLT section.
   bool
   has_plt_offset() const
@@ -1489,6 +1494,20 @@ class Symbol_table
   write_section_symbol(const Output_section*, Output_symtab_xindex*,
                       Output_file*, off_t) const;
 
+  // Loop over all symbols, applying the function F to each.
+  template<int size, typename F>
+  void
+  for_all_symbols(F f) const
+  {
+    for (Symbol_table_type::const_iterator p = this->table_.begin();
+         p != this->table_.end();
+         ++p)
+      {
+       Sized_symbol<size>* sym = static_cast<Sized_symbol<size>*>(p->second);
+       f(sym);
+      }
+  }
+
   // Dump statistical information to stderr.
   void
   print_stats() const;
This page took 0.027037 seconds and 4 git commands to generate.