aboutsummaryrefslogtreecommitdiff
path: root/gold/x86_64.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-13 02:44:50 +0000
committerIan Lance Taylor <iant@google.com>2008-02-13 02:44:50 +0000
commit0daa6f62c88fe4d1dd680b09e855c4b8b7811403 (patch)
treef1d3948b1a9e9c87fa20dbac6b2437bcd81a3bf0 /gold/x86_64.cc
parentcaa9d5d9191af934ff7949fea080d72524c92cfa (diff)
downloadgdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.zip
gdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.tar.gz
gdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.tar.bz2
Support selecting target by name.
Diffstat (limited to 'gold/x86_64.cc')
-rw-r--r--gold/x86_64.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/x86_64.cc b/gold/x86_64.cc
index d5869dc..c65031e 100644
--- a/gold/x86_64.cc
+++ b/gold/x86_64.cc
@@ -2223,6 +2223,9 @@ public:
Target*
recognize(int machine, int osabi, int abiversion);
+ Target*
+ recognize_by_name(const char*);
+
private:
Target_x86_64* target_;
};
@@ -2238,6 +2241,16 @@ Target_selector_x86_64::recognize(int, int, int)
return this->target_;
}
+Target*
+Target_selector_x86_64::recognize_by_name(const char* name)
+{
+ if (strcmp(name, "elf64-x86-64") != 0)
+ return NULL;
+ if (this->target_ == NULL)
+ this->target_ = new Target_x86_64();
+ return this->target_;
+}
+
Target_selector_x86_64 target_selector_x86_64;
} // End anonymous namespace.