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