summaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c34
1 files changed, 18 insertions, 16 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index 893da86e27e..bab76e25baf 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -3121,8 +3121,6 @@ svr4_lp64_fetch_link_map_offsets (void)
}
-struct target_so_ops svr4_so_ops;
-
/* Search order for ELF DSOs linked with -Bsymbolic. Those DSOs have a
different rule for symbol lookup. The lookup begins here in the DSO, not in
the main executable. */
@@ -3163,24 +3161,28 @@ svr4_iterate_over_objfiles_in_search_order
}
}
+const struct target_so_ops svr4_so_ops =
+{
+ svr4_relocate_section_addresses,
+ svr4_free_so,
+ svr4_clear_so,
+ svr4_clear_solib,
+ svr4_solib_create_inferior_hook,
+ svr4_current_sos,
+ 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,
+ svr4_handle_solib_event,
+};
+
void _initialize_svr4_solib ();
void
_initialize_svr4_solib ()
{
- svr4_so_ops.relocate_section_addresses = svr4_relocate_section_addresses;
- svr4_so_ops.free_so = svr4_free_so;
- svr4_so_ops.clear_so = svr4_clear_so;
- svr4_so_ops.clear_solib = svr4_clear_solib;
- svr4_so_ops.solib_create_inferior_hook = svr4_solib_create_inferior_hook;
- svr4_so_ops.current_sos = svr4_current_sos;
- svr4_so_ops.open_symbol_file_object = open_symbol_file_object;
- svr4_so_ops.in_dynsym_resolve_code = svr4_in_dynsym_resolve_code;
- svr4_so_ops.bfd_open = solib_bfd_open;
- svr4_so_ops.same = svr4_same;
- svr4_so_ops.keep_data_in_core = svr4_keep_data_in_core;
- svr4_so_ops.update_breakpoints = svr4_update_solib_event_breakpoints;
- svr4_so_ops.handle_event = svr4_handle_solib_event;
-
gdb::observers::free_objfile.attach (svr4_free_objfile_observer,
"solib-svr4");
}