aboutsummaryrefslogtreecommitdiff
path: root/gold/plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/plugin.cc')
-rw-r--r--gold/plugin.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/gold/plugin.cc b/gold/plugin.cc
index 7e259e0..5701fd7 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -985,6 +985,22 @@ Sized_pluginobj<size, big_endian>::do_should_include_member(
return Archive::SHOULD_INCLUDE_UNKNOWN;
}
+// Iterate over global symbols, calling a visitor class V for each.
+
+template<int size, bool big_endian>
+void
+Sized_pluginobj<size, big_endian>::do_for_all_global_symbols(
+ Read_symbols_data*,
+ Library_base::Symbol_visitor_base* v)
+{
+ for (int i = 0; i < this->nsyms_; ++i)
+ {
+ const struct ld_plugin_symbol& sym = this->syms_[i];
+ if (sym.def != LDPK_UNDEF)
+ v->visit(sym.name);
+ }
+}
+
// Get the size of a section. Not used for plugin objects.
template<int size, bool big_endian>