diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-13 02:44:50 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-13 02:44:50 +0000 |
commit | 0daa6f62c88fe4d1dd680b09e855c4b8b7811403 (patch) | |
tree | f1d3948b1a9e9c87fa20dbac6b2437bcd81a3bf0 /gold/i386.cc | |
parent | caa9d5d9191af934ff7949fea080d72524c92cfa (diff) | |
download | gdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.zip gdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.tar.gz gdb-0daa6f62c88fe4d1dd680b09e855c4b8b7811403.tar.bz2 |
Support selecting target by name.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r-- | gold/i386.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/i386.cc b/gold/i386.cc index 2d8efdd..8bd3f32 100644 --- a/gold/i386.cc +++ b/gold/i386.cc @@ -2433,6 +2433,9 @@ public: Target* recognize(int machine, int osabi, int abiversion); + Target* + recognize_by_name(const char* name); + private: Target_i386* target_; }; @@ -2448,6 +2451,16 @@ Target_selector_i386::recognize(int, int, int) return this->target_; } +Target* +Target_selector_i386::recognize_by_name(const char* name) +{ + if (strcmp(name, "elf32-i386") != 0) + return NULL; + if (this->target_ == NULL) + this->target_ = new Target_i386(); + return this->target_; +} + Target_selector_i386 target_selector_i386; } // End anonymous namespace. |