gold patch committed: Add --cref

Ian Lance Taylor
Tue Jan 5 21:53:00 GMT 2010

I committed this patch to gold to add support for the --cref option.


2010-01-05  Ian Lance Taylor  <>

	PR 10980
	* options.h (class General_options): Add --cref.
	* (main): Print cref table if --cref.  Don't close mapfile
	until after printing cref table.
	* Include "symtab.h".
	(class Cref_inputs): Define Cref_table_compare and Cref_table.
	(Cref_table_compare::operator()): New function.
	(Cref_inputs::gather_cref): New function.
	(filecol): New static const.
	(Cref_inputs::print_cref): New function.
	(Cref::print_cref): New function.
	* cref.h: Include <cstdio>.
	(class Cref): Update declarations.
	* mapfile.h (Mapfile::file): New function.
	* object.h (class Object): Define Symbols.  Declare virtual
	(Object::get_global_symbols): New function.
	* (Input_objects::add_object): Pass object to cref_ if
	(Input_objects::archive_start): Likewise.
	(Input_objects::archive_stop): Likewise.
	(Input_objects::print_cref): New function.
	* dynobj.h (Sized_dynobj::do_get_global_symbols): New function.
	* (big_endian>::do_add_symbols): Create symbols_ if
	* (Sized_pluginobj::do_get_global_symbols): New
	* plugin.h (class Sized_pluginobj): Update declarations.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 17627 bytes
Desc: cref
URL: <>

More information about the Binutils mailing list