[gold][patch] Change how to specify options for the plugins

Rafael Espindola espindola@google.com
Thu Dec 4 11:22:00 GMT 2008


This patch changes the command line option used to specify plugin
options. Right now it is

ld --plugin plugin1.so,foo1,bar1 --plugin plugin2.so,foo2,bar2

With the patch it becomes

ld --plugin plugin1 --plugin-opt foo1 --plugin-opt bar1 --plugin
plugin2.so --plugin-opt foo2 --plugin-opt bar2

This makes gold's code a bit simpler and makes it much easier to
construct the command line using gcc's spec system.

2008-12-04  Rafael Avila de Espindola  <espindola@google.com>

	* options.cc (General_options::parse_plugin_opt): New.
	(General_options::add_plugin): The argument now is just the filename.
	(General_options::add_plugin_option): New.
	* options.h (plugin_opt): New.
	(add_plugin): Change argument name.
	(add_plugin_option): New.
	* plugin.cc (Plugin::load): Don't parse the plugin option.
	* plugin.h (Plugin::Plugin): Rename argument. Init filename_.
	(Plugin::add_option): New.
	(Plugin::args_): Change type.
	(Plugin::filename_): New.
	(Plugin_manager::add_plugin_option): New.
	* testsuite/Makefile.am (plugin_test_1): Use new syntax.
	* testsuite/Makefile.in: Regenerate.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold.patch
Type: text/x-diff
Size: 8762 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20081204/dfcce0ba/attachment.bin>


More information about the Binutils mailing list