+static void
+reload_shared_libraries (char *ignored, int from_tty,
+ struct cmd_list_element *e)
+{
+ no_shared_libraries (NULL, from_tty);
+ solib_add (NULL, from_tty, NULL, auto_solib_add);
+ /* Creating inferior hooks here has two purposes. First, if we reload
+ shared libraries then the address of solib breakpoint we've computed
+ previously might be no longer valid. For example, if we forgot to set
+ solib-absolute-prefix and are setting it right now, then the previous
+ breakpoint address is plain wrong. Second, installing solib hooks
+ also implicitly figures were ld.so is and loads symbols for it.
+ Absent this call, if we've just connected to a target and set
+ solib-absolute-prefix or solib-search-path, we'll lose all information
+ about ld.so. */
+ if (target_has_execution)
+ {
+#ifdef SOLIB_CREATE_INFERIOR_HOOK
+ SOLIB_CREATE_INFERIOR_HOOK (PIDGET (inferior_ptid));
+#else
+ solib_create_inferior_hook ();
+#endif
+ }
+ /* We have unloaded and then reloaded debug info for all shared libraries.
+ However, frames may still reference them, for example a frame's
+ unwinder might still point of DWARF FDE structures that are now freed.
+ Reinit frame cache to avoid crashing. */
+ reinit_frame_cache ();
+}
+
+static void
+show_auto_solib_add (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value)
+{
+ fprintf_filtered (file, _("Autoloading of shared library symbols is %s.\n"),
+ value);
+}
+
+
+/* Handler for library-specific lookup of global symbol NAME in OBJFILE. Call
+ the library-specific handler if it is installed for the current target. */
+
+struct symbol *
+solib_global_lookup (const struct objfile *objfile,
+ const char *name,
+ const char *linkage_name,
+ const domain_enum domain)
+{
+ struct target_so_ops *ops = solib_ops (target_gdbarch);
+
+ if (ops->lookup_lib_global_symbol != NULL)
+ return ops->lookup_lib_global_symbol (objfile, name, linkage_name, domain);
+ return NULL;
+}
+
+
+extern initialize_file_ftype _initialize_solib; /* -Wmissing-prototypes */
+