[PATCH] plugin: Search bfd-plugins directories only once

Alan Modra amodra@gmail.com
Thu Feb 13 05:15:00 GMT 2020


On Wed, Feb 12, 2020 at 06:25:03AM -0800, H.J. Lu wrote:
> It turned out that I need bfd_plugin_specified_p.  Here is the updated
> patch to keep bfd_plugin_specified_p.
> 
> H.J.
> ---
> try_load_plugin is updated to take either plugin name or plugin entry.
> load_plugin is updated to search bfd-plugins directories first to build
> list of plugins and call try_load_plugin with each plugin on the list.
> When --plugin is used, the plugin list only has one entry.
> 
> 	* plugin.c (try_load_plugin): Make plugin_list_iter an argument
> 	and use it if it in't NULL.  Remove has_plugin_p argument.  Add
> 	a build_list_p argument.  Don't search plugin_list.  Short circuit
> 	for build_list.
> 	(has_plugin): Renamed to has_plugin_list.
> 	(bfd_plugin_set_plugin): Don't set has_plugin.
> 	(bfd_plugin_specified_p): Check plugin_list instead.
> 	(build_plugin_list): New function.
> 	(load_plugin): Call build_plugin_list and use plugin_list.

OK.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list