plugin.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Plugin control for the GNU linker.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. This file is part of the GNU Binutils.
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  15. MA 02110-1301, USA. */
  16. #ifndef GLD_PLUGIN_H
  17. #define GLD_PLUGIN_H
  18. /* Report plugin symbols. */
  19. extern bool report_plugin_symbols;
  20. /* Set at all symbols read time, to avoid recursively offering the plugin
  21. its own newly-added input files and libs to claim. */
  22. extern bool no_more_claiming;
  23. /* This is the only forward declaration we need to avoid having
  24. to include the plugin-api.h header in order to use this file. */
  25. struct ld_plugin_input_file;
  26. /* Handle -plugin arg: find and load plugin. */
  27. extern void plugin_opt_plugin (const char *plugin);
  28. /* Accumulate option arguments for last-loaded plugin, or return
  29. error if none. */
  30. extern int plugin_opt_plugin_arg (const char *arg);
  31. /* Load up and initialise all plugins after argument parsing. */
  32. extern void plugin_load_plugins (void);
  33. /* Return name of plugin which caused an error in any of the above. */
  34. extern const char *plugin_error_plugin (void);
  35. /* Call 'claim file' hook for all plugins. */
  36. extern void plugin_maybe_claim (lang_input_statement_type *);
  37. /* Call 'all symbols read' hook for all plugins. */
  38. extern int plugin_call_all_symbols_read (void);
  39. /* Call 'cleanup' hook for all plugins at exit. */
  40. extern void plugin_call_cleanup (void);
  41. #endif /* !def GLD_PLUGIN_H */