summaryrefslogtreecommitdiffstats
path: root/gold/testsuite/testfile.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-03-25 21:39:01 +0000
committerIan Lance Taylor <ian@airs.com>2008-03-25 21:39:01 +0000
commite96caa791095788fe6b3cbbdc54547278ca70db7 (patch)
treeeb8a097a06011ca8cd7e47ef21a458afb4ec07e5 /gold/testsuite/testfile.cc
parent874c5b289fe4dbacaf9679fb8331c6b7e39ea269 (diff)
downloadppe42-binutils-e96caa791095788fe6b3cbbdc54547278ca70db7.tar.gz
ppe42-binutils-e96caa791095788fe6b3cbbdc54547278ca70db7.zip
* 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.
Diffstat (limited to 'gold/testsuite/testfile.cc')
-rw-r--r--gold/testsuite/testfile.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/gold/testsuite/testfile.cc b/gold/testsuite/testfile.cc
index 1289fea8e6..d33078f5f8 100644
--- a/gold/testsuite/testfile.cc
+++ b/gold/testsuite/testfile.cc
@@ -137,11 +137,18 @@ class Target_selector_test : public Target_selector
{
public:
Target_selector_test()
- : Target_selector(0xffff, size, big_endian)
+ : Target_selector(0xffff, size, big_endian, NULL)
{ }
Target*
- recognize(int, int, int)
+ do_instantiate_target()
+ {
+ gold_unreachable();
+ return NULL;
+ }
+
+ Target*
+ do_recognize(int, int, int)
{
if (size == 32)
{
@@ -178,8 +185,12 @@ class Target_selector_test : public Target_selector
}
Target*
- recognize_by_name(const char*)
+ do_recognize_by_name(const char*)
{ return NULL; }
+
+ void
+ do_supported_names(std::vector<const char*>*)
+ { }
};
// Register the test target selectors. These don't need to be
OpenPOWER on IntegriCloud