From 0d31c79dad789b6e82620d842e8ba8c5d71cde88 Mon Sep 17 00:00:00 2001 From: Doug Kwan Date: Wed, 3 Feb 2010 05:36:55 +0000 Subject: 2010-02-02 Doug Kwan * Makefile.am (HFILES): Add arm-reloc-property.h. (DEFFILES): New. (TARGETSOURCES): Add arm-reloc-property.cc (ALL_TARGETOBJS): Add arm-reloc-property.$(OBJEXT) (libgold_a_SOURCES): $(DEFFILES) * Makefile.in: Regenerate. * arm-reloc-property.cc: New file. * arm-reloc-property.h: New file. * arm-reloc.def: New file. * arm.cc: Update comments. (arm-reloc-property.h): New included header. (arm_reloc_property_table): New global variable. (Target_arm::do_select_as_default_target): New method definition. * configure.tgt (armeb*-*-*,armbe*-*-*,arm*-*-*): Add arm-reloc-property to targ_extra_obj. * parameters.cc (set_parameters_target): Call Target::select_as_default_target(). * target.h (Target::select_as_default_target): New method definition. (Target::do_select_as_default_target): Same. --- gold/target.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gold/target.h') diff --git a/gold/target.h b/gold/target.h index 88cc973..20de7a4 100644 --- a/gold/target.h +++ b/gold/target.h @@ -325,6 +325,12 @@ class Target attributes_order(int num) const { return this->do_attributes_order(num); } + // When a target is selected as the default target, we call this method, + // which may be used for expensive, target-specific initialization. + void + select_as_default_target() + { this->do_select_as_default_target(); } + protected: // This struct holds the constant information for a child class. We // use a struct to avoid the overhead of virtual function calls for @@ -510,6 +516,11 @@ class Target do_attributes_order(int num) const { return num; } + // This may be overridden by the child class. + virtual void + do_select_as_default_target() + { } + private: // The implementations of the four do_make_elf_object virtual functions are // almost identical except for their sizes and endianity. We use a template. -- cgit v1.1