From 97b6ffe44b98479f991ab38b4c59f4fd0f30198e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 6 Aug 2025 11:36:03 +0930 Subject: Move struct plugin_data_struct to plugin.c It isn't needed anywhere except plugin.c. The typedef can disappear. Also make a forward declaraion for ld_plugin_input_file in plugin.h so that this header can be used without first including plugin-api.h. bfd/ * plugin.h (struct ld_plugin_input_file): Forward declare. (struct plugin_data_struct): Move to.. * plugin.c: ..here. (add_symbols): Size plugin_data without using type. * archive.c: Don't include plugin-api.h. * elflink.c: Likewise. * format.c: Likewise. binutils/ * ar.c: Don't include plugin-api.h or ansidecl.h. Only include plugin.h when BFD_SUPPORTS_PLUGINS. * nm.c: Don't include plugin-api.h. Only include plugin.h when BFD_SUPPORTS_PLUGINS. * objcopy.c: Likewise. ld/ * ldfile.c: Don't include plugin-api.h. * ldmain.c: Likewise. --- bfd/plugin.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'bfd/plugin.h') diff --git a/bfd/plugin.h b/bfd/plugin.h index 6acb5fa..d981c51 100644 --- a/bfd/plugin.h +++ b/bfd/plugin.h @@ -21,6 +21,8 @@ #ifndef _PLUGIN_H_ #define _PLUGIN_H_ +struct ld_plugin_input_file; + void bfd_plugin_set_program_name (const char *); int bfd_plugin_open_input (bfd *, struct ld_plugin_input_file *); void bfd_plugin_set_plugin (const char *); @@ -29,13 +31,4 @@ bool bfd_link_plugin_object_p (bfd *); void register_ld_plugin_object_p (bfd_cleanup (*object_p) (bfd *, bool)); void bfd_plugin_close_file_descriptor (bfd *, int); -typedef struct plugin_data_struct -{ - int nsyms; - const struct ld_plugin_symbol *syms; - int object_only_nsyms; - asymbol **object_only_syms; -} -plugin_data_struct; - #endif -- cgit v1.1