Commit Graph

9 Commits

Author SHA1 Message Date
Ian Lance Taylor 7f055c204a 2009-03-23 Ian Lance Taylor <iant@google.com>
* gold-threads.h (class Initialize_lock): Define.
	* gold-threads.cc (class Initialize_lock_once): Define.
	(initialize_lock_control): New static variable.
	(initialize_lock_pointer): New static variable.
	(initialize_lock_once): New static function.
	(Initialize_lock::Initialize_lock): Define.
	(Initialize_lock::initialize): Define.
	* target-select.h: Include "gold-threads.h".
	(class Target_selector): Add lock_ and initialize_lock_ fields.
	Don't define instantiate_target, just declare it.
	* target-select.cc (Target_selector::Target_selector): Initialize
	new fields.
	(Target_selector::instantiate_target): Define.
	* descriptors.h: Include "gold-threads.h".
	(class Descriptors): Add initialize_lock_ field.
	* descriptors.cc (Descriptors::Descriptors): Initialize new
	field.
	(Descriptors::open): Use initialize_lock_ field
	* errors.h (class Errors): Add initialize_lock_ field.
	* errors.cc (Errors::Errors): Initialize new field.
	(Errors::initialize_lock): Use initialize_lock_ field.
	* powerpc.cc (class Target_selector_powerpc): Remove
	instantiated_target_ field.  In do_recognize call
	instantiate_target rather than do_instantiate_target.  In
	do_instantiate_target just allocate a new target.
	* sparc.cc (class Target_selector_sparc): Likewise.
2009-03-24 04:50:32 +00:00
Ian Lance Taylor 3695968186 2009-03-23 Ian Lance Taylor <iant@google.com>
* freebsd.h: New file.
	* i386.cc: Include "freebsd.h".
	(Target_i386): Derive from Target_freebsd rather than
	Sized_target.
	(Target_selector_i386): Derive from Target_selector_freebsd rather
	than Target_selector.
	* x86_64.cc: Include "freebsd.h".
	(Target_x86_64): Derive from Target_freebsd rather than
	Sized_target.
	(Target_selector_x86_64): Derive from Target_selector_freebsd
	rather than Target_selector.
	* target.h (class Target): Add adjust_elf_header and
	do_adjust_elf_header.
	* output.cc (Output_file_header:: do_sized_write): Call target
	adjust_elf_header routine.
	* configure.tgt: Set targ_osabi.
	* configure.ac: Define GOLD_DEFAULT_OSABI.
	* parameters.cc (Parameters::default_target): Pass
	GOLD_DEFAULT_OSABI to select_target.
	* target-select.h (class Target_selector): Make instantiate_target
	protected rather than private.
	* Makefile.am (HFILES): Add freebsd.h.
	* configure, Makefile.in, config.in: Rebuild.
2009-03-24 00:31:29 +00:00
Ian Lance Taylor e96caa7910 * options.cc (options::help): Print list of supported targets.
* target-select.h: Include <vector>.
	(class Target_selector): Make machine_, size_, and is_big_endian_
	fields const.  Add bfd_name_ and instantiated_target_ fields.
	(Target_selector::Target_selector): Add bfd_name parameter.
	(Target_selector::recognize): Make non-virtual, call
	do_recognize.
	(Target_selector::recognize_by_name): Make non-virtual, call
	do_recognize_by_name.
	(Target_selector::supported_names): New function.
	(Target_selector::bfd_name): New function.
	(Target_selector::do_instantiate_target): New pure virtual
	function.
	(Target_selector::do_recognize): New virtual function.
	(Target_selector::do_recognize_by_name): New virtual function.
	(Target_selector::instantiate_target): New private function.
	(supported_target_names): Declare.
	* target-select.cc (Target_selector::Target_selector): Update for
	new parameter and fields.
	(select_target_by_name): Check that the name matches before
	calling recognize_by_name.
	(supported_target_names): New function.
	* i386.cc (class Target_selector_i386): Update Target_selector
	constructor call.  Remove recognize and recognize_by_name.  Add
	do_instantiate_target.
	* x86_64.cc (class Target_selector_x86_64): Likewise.
	* testsuite/testfile.cc (class Target_selector_test): Update for
	changes to Target_selector.
2008-03-25 21:39:01 +00:00
Ian Lance Taylor ebdbb4583d Update copyright years. Update language files. 2008-03-13 21:04:21 +00:00
Ian Lance Taylor 0daa6f62c8 Support selecting target by name. 2008-02-13 02:44:50 +00:00
Ian Lance Taylor 6340166c8b Parameterize object_unittest to work for whatever target types are
supported.
2007-10-03 00:34:49 +00:00
Ian Lance Taylor 6cb15b7f89 Add licensing text to every source file. 2007-09-22 21:02:10 +00:00
Ian Lance Taylor ead1e4244a Can now do a full static link of hello, world in C or C++ 2006-11-03 18:26:11 +00:00
Ian Lance Taylor 14bfc3f555 Another snapshot of the current state of the sources. Gets to the
point of symbol resolution and can now issue a multiple definition
error.  Also added target selection infrastructure.
2006-08-18 22:29:20 +00:00