diff options
author | Ian Lance Taylor <iant@google.com> | 2006-08-18 22:29:20 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-08-18 22:29:20 +0000 |
commit | 14bfc3f55540e60253cc4aae73261325309f750a (patch) | |
tree | cb74fe438b44c7aa6e02f05e14f13ba1ae0b508a /gold/i386.cc | |
parent | 476308bf9bd077b87791da50a13a74b2698c01c7 (diff) | |
download | gdb-14bfc3f55540e60253cc4aae73261325309f750a.zip gdb-14bfc3f55540e60253cc4aae73261325309f750a.tar.gz gdb-14bfc3f55540e60253cc4aae73261325309f750a.tar.bz2 |
Another snapshot of the current state of the sources. Gets to the
point of symbol resolution and can now issue a multiple definition
error. Also added target selection infrastructure.
Diffstat (limited to 'gold/i386.cc')
-rw-r--r-- | gold/i386.cc | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gold/i386.cc b/gold/i386.cc new file mode 100644 index 0000000..5ecd2e3 --- /dev/null +++ b/gold/i386.cc @@ -0,0 +1,47 @@ +// i386.cc -- i386 target support for gold. + +#include "gold.h" +#include "elfcpp.h" +#include "target.h" +#include "target-select.h" + +namespace +{ + +using namespace gold; + +// The i386 target class. + +class Target_i386 : public Sized_target<32, false> +{ + public: + Target_i386() + : Sized_target<32, false>(false, false) + { } +}; + +// The selector for i386 object files. + +class Target_selector_i386 : public Target_selector +{ +public: + Target_selector_i386() + : Target_selector(elfcpp::EM_386, 32, false) + { } + + Target* + recognize(int machine, int osabi, int abiversion) const; +}; + +// Recognize an i386 object file when we already know that the machine +// number is EM_386. + +Target* +Target_selector_i386::recognize(int, int, int) const +{ + return new Target_i386(); +} + +Target_selector_i386 target_selector_i386; + +} // End anonymous namespace. |