diff options
author | Alan Modra <amodra@gmail.com> | 2012-12-10 11:45:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2012-12-10 11:45:18 +0000 |
commit | edc27beb5885fc797a8089071bcebee761352f12 (patch) | |
tree | 86661aef0991639f52569cf73d01800c94c6e660 /gold/powerpc.cc | |
parent | 906b9150c78e8d6c884b848c61a954a81f92fbed (diff) | |
download | fsf-binutils-gdb-edc27beb5885fc797a8089071bcebee761352f12.zip fsf-binutils-gdb-edc27beb5885fc797a8089071bcebee761352f12.tar.gz fsf-binutils-gdb-edc27beb5885fc797a8089071bcebee761352f12.tar.bz2 |
* powerpc.cc (Target_selector_powerpc::Target_selector_powerpc):
Set EM_PPC64 or EM_PPC here.
(Target_selector_powerpc::do_recognize): Delete.
Diffstat (limited to 'gold/powerpc.cc')
-rw-r--r-- | gold/powerpc.cc | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/gold/powerpc.cc b/gold/powerpc.cc index 896e8ab..32b7b70 100644 --- a/gold/powerpc.cc +++ b/gold/powerpc.cc @@ -6942,7 +6942,8 @@ class Target_selector_powerpc : public Target_selector { public: Target_selector_powerpc() - : Target_selector(elfcpp::EM_NONE, size, big_endian, + : Target_selector(size == 64 ? elfcpp::EM_PPC64 : elfcpp::EM_PPC, + size, big_endian, (size == 64 ? (big_endian ? "elf64-powerpc" : "elf64-powerpcle") : (big_endian ? "elf32-powerpc" : "elf32-powerpcle")), @@ -6952,28 +6953,6 @@ public: { } virtual Target* - do_recognize(Input_file*, off_t, int machine, int, int) - { - switch (size) - { - case 64: - if (machine != elfcpp::EM_PPC64) - return NULL; - break; - - case 32: - if (machine != elfcpp::EM_PPC) - return NULL; - break; - - default: - return NULL; - } - - return this->instantiate_target(); - } - - virtual Target* do_instantiate_target() { return new Target_powerpc<size, big_endian>(); } }; |