Lines Matching defs:plugin

32 #include "plugin-api.h"
33 #include "../bfd/plugin.h"
34 #include "plugin.h"
56 /* Report plugin symbols. */
61 plugin. For cosmetic use only; appears in maps, crefs etc. */
62 #define IRONLY_SUFFIX " (symbol from plugin)"
64 /* Stores a single argument passed to a plugin. */
71 /* Holds all details of a single plugin. */
72 typedef struct plugin
75 struct plugin *next;
76 /* The argument string given to --plugin. */
80 /* The list of argument string given to --plugin-opt. */
84 /* The plugin's event handlers. */
118 /* The last plugin added to the list, for receiving args. */
121 /* The tail of the arg chain of the last plugin added to the list. */
124 /* The plugin which is currently having a callback executed. */
127 /* Last plugin to cause an error, if any. */
133 /* Original linker callbacks, and the plugin version. */
137 /* Set at all symbols read time, to avoid recursively offering the plugin
214 set_plugin_error (const char *plugin)
216 error_plugin = plugin;
227 /* Return name of plugin which caused an error if any. */
231 return error_plugin ? error_plugin : _("<no plugin>");
234 /* Handle -plugin arg: find and load plugin, or return error. */
236 plugin_opt_plugin (const char *plugin)
243 newplug->name = plugin;
244 newplug->dlhandle = dlopen (plugin, RTLD_NOW);
246 einfo (_("%P%F: %s: error loading plugin: %s\n"), plugin, dlerror ());
248 /* Check if plugin has been loaded already. */
253 einfo (_("%P: %s: duplicated plugin\n"), plugin);
264 /* Record it as current plugin for receiving args. */
269 /* Accumulate option arguments for last-loaded plugin, or return
277 return set_plugin_error (_("<no plugin>"));
483 /* Add symbols from a plugin-claimed input file. */
646 what visibility the plugin would have liked to apply when it first
667 /* Get the symbol resolution info for a plugin-claimed input file. */
691 /* The plugin is called to claim symbols in an archive element
724 einfo ("%P%F: %s: plugin symbol table corrupt (sym type %d)\n",
804 /* Add a new (real) input file generated by a plugin. */
819 /* Add a new (real) library required by a plugin. */
844 /* Issue a diagnostic message from a plugin. */
963 /* Append the per-plugin args list and trailing LDPT_NULL to tv. */
965 set_tv_plugin_args (plugin_t *plugin, struct ld_plugin_tv *tv)
967 plugin_arg_t *arg = plugin->args;
1015 einfo (_("%P%F: %s: error loading plugin: %s\n"),
1022 einfo (_("%P%F: %s: plugin error: %d\n"), curplug->name, rv);
1026 /* Since plugin(s) inited ok, assume they're going to want symbol
1108 the plugin may want to add. */
1113 einfo (_("%P%F: plugin failed to allocate memory for input: %s\n"),
1127 /* The plugin API expects that the file descriptor won't be closed
1146 einfo (_("%P%F: %s: plugin reported error claiming file\n"),
1151 /* FIXME: fd belongs to us, not the plugin. GCC plugin, which
1153 BFD plugin target vector. Since GCC plugin doesn't call
1154 release_input_file, we close it here. LLVM plugin, which
1156 release_input_file after it is done, uses BFD plugin target
1157 vector. This scheme doesn't work when a plugin needs fd and
1158 doesn't use BFD plugin target vector neither. */
1175 /* If plugin didn't claim the file, unmap the buffer. */
1187 /* If plugin didn't claim the file, we don't need the dummy bfd.
1256 info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),