gdb: remove find_and_open_solib so_list method

Now that the nto port is removed, this is unused.

Change-Id: I86565310cdbcde17a837eb10585cdd153f4f03d8
Approved-by: Kevin Buettner <kevinb@redhat.com>
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 9f377f4..8c3ff39 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -3364,7 +3364,6 @@ const struct solib_ops svr4_so_ops =
   open_symbol_file_object,
   svr4_in_dynsym_resolve_code,
   solib_bfd_open,
-  nullptr,
   svr4_same,
   svr4_keep_data_in_core,
   svr4_update_solib_event_breakpoints,
diff --git a/gdb/solib.c b/gdb/solib.c
index 931fa57..49f6075 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -114,7 +114,6 @@ show_solib_search_path (struct ui_file *file, int from_tty,
 static gdb::unique_xmalloc_ptr<char>
 solib_find_1 (const char *in_pathname, int *fd, bool is_solib)
 {
-  const solib_ops *ops = gdbarch_so_ops (current_inferior ()->arch ());
   int found_file = -1;
   gdb::unique_xmalloc_ptr<char> temp_pathname;
   const char *fskind = effective_target_file_system_kind ();
@@ -297,12 +296,6 @@ solib_find_1 (const char *in_pathname, int *fd, bool is_solib)
 			target_lbasename (fskind, in_pathname),
 			O_RDONLY | O_BINARY, &temp_pathname);
 
-  /* If not found, and we're looking for a solib, try to use target
-     supplied solib search method.  */
-  if (is_solib && found_file < 0 && ops->find_and_open_solib)
-    found_file = ops->find_and_open_solib (in_pathname, O_RDONLY | O_BINARY,
-					   &temp_pathname);
-
   /* If not found, next search the inferior's $PATH environment variable.  */
   if (found_file < 0 && sysroot == NULL)
     found_file = openp (current_inferior ()->environment.get ("PATH"),
diff --git a/gdb/solist.h b/gdb/solist.h
index f0d2208..6b2a97a 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -132,14 +132,6 @@ struct solib_ops
   /* Find and open shared library binary file.  */
   gdb_bfd_ref_ptr (*bfd_open) (const char *pathname);
 
-  /* Optional extra hook for finding and opening a solib.
-     If TEMP_PATHNAME is non-NULL: If the file is successfully opened a
-     pointer to a malloc'd and realpath'd copy of SONAME is stored there,
-     otherwise NULL is stored there.  */
-  int (*find_and_open_solib) (const char *soname,
-			      unsigned o_flags,
-			      gdb::unique_xmalloc_ptr<char> *temp_pathname);
-
   /* Given two so_list objects, one from the GDB thread list
      and another from the list returned by current_sos, return 1
      if they represent the same library.