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