PR ld/10515
[binutils-gdb.git] / gold / parameters.cc
index 729305116aad78086d58ac1cff81c0abb17a312d..0164265bf04eb7f88dd42dbe059d3107d765ac2a 100644 (file)
@@ -92,11 +92,22 @@ Parameters::default_target() const
   const Target* target = select_target(elfcpp::GOLD_DEFAULT_MACHINE,
                                        GOLD_DEFAULT_SIZE,
                                        GOLD_DEFAULT_BIG_ENDIAN,
-                                       0, 0);
+                                      elfcpp::GOLD_DEFAULT_OSABI,
+                                      0);
   gold_assert(target != NULL);
   return *target;
 }
 
+// Return whether TARGET is compatible with the target we are using.
+
+bool
+Parameters::is_compatible_target(const Target* target) const
+{
+  if (this->target_ == NULL)
+    return true;
+  return target == this->target_;
+}
+
 Parameters::Target_size_endianness
 Parameters::size_and_endianness() const
 {