Home | History | Annotate | Download | only in ld

Lines Matching defs:plugin

0 /* Plugin control for the GNU linker.
34 #include "plugin-api.h"
35 #include "../bfd/plugin.h"
36 #include "plugin.h"
60 /* Report plugin symbols. */
65 plugin. For cosmetic use only; appears in maps, crefs etc. */
66 #define IRONLY_SUFFIX " (symbol from plugin)"
68 /* Stores a single argument passed to a plugin. */
75 /* Holds all details of a single plugin. */
76 typedef struct plugin
79 struct plugin *next;
80 /* The argument string given to --plugin. */
84 /* The list of argument string given to --plugin-opt. */
88 /* The plugin's event handlers. */
126 /* The last plugin added to the list, for receiving args. */
129 /* The tail of the arg chain of the last plugin added to the list. */
132 /* The plugin which is currently having a callback executed. */
135 /* Last plugin to cause an error, if any. */
141 /* Original linker callbacks, and the plugin version. */
145 /* Set at all symbols read time, to avoid recursively offering the plugin
223 set_plugin_error (const char *plugin)
225 error_plugin = plugin;
236 /* Return name of plugin which caused an error if any. */
240 return error_plugin ? error_plugin : _("<no plugin>");
243 /* Handle -plugin arg: find and load plugin, or return error. */
245 plugin_opt_plugin (const char *plugin)
252 newplug->name = plugin;
253 newplug->dlhandle = dlopen (plugin, RTLD_NOW);
255 fatal (_("%P: %s: error loading plugin: %s\n"), plugin, dlerror ());
257 /* Check if plugin has been loaded already. */
262 einfo (_("%P: %s: duplicated plugin\n"), plugin);
273 /* Record it as current plugin for receiving args. */
278 /* Accumulate option arguments for last-loaded plugin, or return
286 return set_plugin_error (_("<no plugin>"));
498 /* Add symbols from a plugin-claimed input file. */
627 /* Release plugin file descriptor. */
673 what visibility the plugin would have liked to apply when it first
756 /* Get the symbol resolution info for a plugin-claimed input file. */
804 /* The plugin is called to claim symbols in an archive element
837 fatal (_("%P: %s: plugin symbol table corrupt (sym type %d)\n"),
924 /* Add a new (real) input file generated by a plugin. */
939 /* Add a new (real) library required by a plugin. */
964 /* Issue a diagnostic message from a plugin. */
1087 /* Append the per-plugin args list and trailing LDPT_NULL to tv. */
1089 set_tv_plugin_args (plugin_t *plugin, struct ld_plugin_tv *tv)
1091 plugin_arg_t *arg = plugin->args;
1139 fatal (_("%P: %s: error loading plugin: %s\n"),
1146 fatal (_("%P: %s: plugin error: %d\n"), curplug->name, rv);
1150 /* Since plugin(s) inited ok, assume they're going to want symbol
1233 plugin claim_file if plugin_format
1235 on LTO object. When KNOWN_USED is true, we call plugin claim_file
1247 the plugin may want to add. */
1252 fatal (_("%P: plugin failed to allocate memory for input: %s\n"),
1281 fatal (_("%P: %s: plugin reported error claiming file\n"),
1287 /* FIXME: fd belongs to us, not the plugin. GCC plugin, which
1289 BFD plugin target vector. Since GCC plugin doesn't call
1290 release_input_file, we close it here. LLVM plugin, which
1292 release_input_file after it is done, uses BFD plugin target
1293 vector. This scheme doesn't work when a plugin needs fd and
1294 doesn't use BFD plugin target vector neither. */
1301 false for plugin claim_file_v2 to avoid including the unused
1317 /* If plugin didn't claim the file, unmap the buffer. */
1329 /* If plugin didn't claim the file, we don't need the dummy bfd.
1403 info_msg (_("%P: %s: error in plugin cleanup: %d (ignored)\n"),