In a couple functions (type_update_when_use_rtti_test and
[deliverable/binutils-gdb.git] / ld / plugin.h
CommitLineData
5d3236ee 1/* Plugin control for the GNU linker.
4b95cf5c 2 Copyright (C) 2010-2014 Free Software Foundation, Inc.
5d3236ee
DK
3
4 This file is part of the GNU Binutils.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
20
21#ifndef GLD_PLUGIN_H
22#define GLD_PLUGIN_H
23
1715a13c
L
24/* Report plugin symbols. */
25extern bfd_boolean report_plugin_symbols;
5d3236ee 26
9e2278f5
AM
27/* Set at all symbols read time, to avoid recursively offering the plugin
28 its own newly-added input files and libs to claim. */
29extern bfd_boolean no_more_claiming;
30
5d3236ee
DK
31/* This is the only forward declaration we need to avoid having
32 to include the plugin-api.h header in order to use this file. */
33struct ld_plugin_input_file;
34
d82184d7
L
35/* Handle -plugin arg: find and load plugin. */
36extern void plugin_opt_plugin (const char *plugin);
5d3236ee
DK
37
38/* Accumulate option arguments for last-loaded plugin, or return
39 error if none. */
40extern int plugin_opt_plugin_arg (const char *arg);
41
d44ad554
DK
42/* Return true if any plugins are active this run. Only valid
43 after options have been processed. */
44extern bfd_boolean plugin_active_plugins_p (void);
45
5d3236ee 46/* Load up and initialise all plugins after argument parsing. */
d82184d7 47extern void plugin_load_plugins (void);
5d3236ee
DK
48
49/* Return name of plugin which caused an error in any of the above. */
50extern const char *plugin_error_plugin (void);
51
52/* Call 'claim file' hook for all plugins. */
02d00247
AM
53extern void plugin_maybe_claim (struct ld_plugin_input_file *,
54 lang_input_statement_type *);
5d3236ee
DK
55
56/* Call 'all symbols read' hook for all plugins. */
57extern int plugin_call_all_symbols_read (void);
58
498cd2a0
AM
59/* Call 'cleanup' hook for all plugins at exit. */
60extern void plugin_call_cleanup (void);
61
5d3236ee
DK
62/* Generate a dummy BFD to represent an IR file, for any callers of
63 plugin_call_claim_file to use as the handle in the ld_plugin_input_file
64 struct that they build to pass in. The BFD is initially writable, so
65 that symbols can be added to it; it must be made readable after the
66 add_symbols hook has been called so that it can be read when linking. */
67extern bfd *plugin_get_ir_dummy_bfd (const char *name, bfd *template);
68
5468810d
AM
69/* Return true if bfd is a dynamic library that should be reloaded. */
70extern bfd_boolean plugin_should_reload (bfd *);
71
5d3236ee 72#endif /* !def GLD_PLUGIN_H */
This page took 0.172931 seconds and 4 git commands to generate.