2009-08-18 Doug Kwan <dougkwan@google.com>

* dynobj.cc (Sized_dynobj::setup): Take a Target object instead of
	an elcpp::Ehdr as parameter.  Adjust call to set_target.
	* dynobj.h (Sized_dynobj::setup): Take a Target object instead of
	an elfcpp::Ehdr as parameter.
	* object.cc (Object::set_target): Remove the version that looks up
	a target and sets it.
	(Sized_relobj::setup): Take a Target object instead of
	an elfcpp::Ehdr as parameter.  Adjust call to set_target.
	(make_elf_sized_object): Find target and ask target to
	make an ELF object.
	* object.h: (Object::set_target): Remove the version that looks up
	a target and sets it.
	(Sized_relobj::setup): Take a Target object instead of
	an elfcpp:Ehdr as parameter.
	* target.cc: Include dynobj.h.
	(Target::do_make_elf_object_implementation): New.
 	(Target::do_make_elf_object): New.
	* target.h (Target::make_elf_object): New template declaration.
	(Target::do_make_elf_object): New method declarations.
	(Target::do_make_elf_object_implementation): New template declaration.
This commit is contained in:
Doug Kwan
2009-08-18 23:49:29 +00:00
parent 688805f3b8
commit f733487b04
7 changed files with 165 additions and 54 deletions

View File

@@ -545,11 +545,6 @@ class Object
virtual void
do_get_global_symbol_counts(const Symbol_table*, size_t*, size_t*) const = 0;
// Set the target.
void
set_target(int machine, int size, bool big_endian, int osabi,
int abiversion);
// Set the number of sections.
void
set_shnum(int shnum)
@@ -1311,9 +1306,9 @@ class Sized_relobj : public Relobj
is_output_section_offset_invalid(unsigned int shndx) const
{ return this->get_output_section_offset(shndx) == invalid_address; }
// Set up the object file based on the ELF header.
// Set up the object file based on TARGET.
void
setup(const typename elfcpp::Ehdr<size, big_endian>&);
setup(Target *target);
// Return the number of symbols. This is only valid after
// Object::add_symbols has been called.