* powerpc.cc (Target_selector_powerpc::Target_selector_powerpc):
authorAlan Modra <amodra@gmail.com>
Mon, 10 Dec 2012 11:45:18 +0000 (11:45 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 10 Dec 2012 11:45:18 +0000 (11:45 +0000)
Set EM_PPC64 or EM_PPC here.
(Target_selector_powerpc::do_recognize): Delete.

gold/ChangeLog
gold/powerpc.cc

index 6db642c1ea348e42350c69c50c57e8af169797de..891ec6a84eb163a3fc1a83ca337aa9aaf9ebadee 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-10  Alan Modra  <amodra@gmail.com>
+
+       * powerpc.cc (Target_selector_powerpc::Target_selector_powerpc):
+       Set EM_PPC64 or EM_PPC here.
+       (Target_selector_powerpc::do_recognize): Delete.
+
 2012-12-10  Alan Modra  <amodra@gmail.com>
 
        * powerpc.cc (Powerpc_relobj::Powerpc_relobj): Init has14_ and
index 896e8ab21ab91d384f218fe69370600ce2c7a50d..32b7b70b8aaf710497bb1812204c6ac2b33a1258 100644 (file)
@@ -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")),
@@ -6951,28 +6952,6 @@ public:
                       : (big_endian ? "elf32ppc" : "elf32lppc")))
   { }
 
-  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>(); }