gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / freebsd.h
index bb86432519fbcf10c1090fdf602f7b7d2b8ecf1a..a868258981f7530f153bce9be557e497b8ab841e 100644 (file)
@@ -1,6 +1,6 @@
 // freebsd.h -- FreeBSD support for gold    -*- C++ -*-
 
-// Copyright 2009, 2011 Free Software Foundation, Inc.
+// Copyright (C) 2009-2020 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -38,8 +38,9 @@ class Target_selector_freebsd : public Target_selector
  public:
   Target_selector_freebsd(int machine, int size, bool is_big_endian,
                          const char* bfd_name,
-                         const char* freebsd_bfd_name)
-    : Target_selector(machine, size, is_big_endian, NULL),
+                         const char* freebsd_bfd_name,
+                         const char* emulation)
+    : Target_selector(machine, size, is_big_endian, NULL, emulation),
       bfd_name_(bfd_name), freebsd_bfd_name_(freebsd_bfd_name)
   { }
 
@@ -47,17 +48,17 @@ class Target_selector_freebsd : public Target_selector
   // If we see a FreeBSD input file, mark the output file as using
   // FreeBSD.
   virtual Target*
-  do_recognize(int, int osabi, int)
+  do_recognize(Input_file*, off_t, int, int osabi, int)
   {
     Target* ret = this->instantiate_target();
     if (osabi == elfcpp::ELFOSABI_FREEBSD)
       ret->set_osabi(static_cast<elfcpp::ELFOSABI>(osabi));
     return ret;
   }
-  
+
   // Recognize two names.
   virtual Target*
-  do_recognize_by_name(const char* name)
+  do_recognize_by_bfd_name(const char* name)
   {
     if (strcmp(name, this->bfd_name_) == 0)
       return this->instantiate_target();
@@ -73,12 +74,23 @@ class Target_selector_freebsd : public Target_selector
 
   // Print both names in --help output.
   virtual void
-  do_supported_names(std::vector<const char*>* names)
+  do_supported_bfd_names(std::vector<const char*>* names)
   {
     names->push_back(this->bfd_name_);
     names->push_back(this->freebsd_bfd_name_);
   }
 
+  // Return appropriate BFD name.
+  virtual const char*
+  do_target_bfd_name(const Target* target)
+  {
+    if (!this->is_our_target(target))
+      return NULL;
+    return (target->osabi() == elfcpp::ELFOSABI_FREEBSD
+           ? this->freebsd_bfd_name_
+           : this->bfd_name_);
+  }
+
  private:
   // The BFD name for the non-Freebsd target.
   const char* bfd_name_;
This page took 0.025833 seconds and 4 git commands to generate.