diff options
author | Tom Tromey <tromey@adacore.com> | 2022-08-08 11:00:50 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-09-20 12:25:19 -0600 |
commit | 549dfc51b07c0c749ebde15a3fa855ab496ea18a (patch) | |
tree | 19524424c91615492c20104d1e6b880e4afa5fc4 /gdb/solib-frv.c | |
parent | 9e468e953cd2f605a3f51d6ef6532e46b8fdd7b4 (diff) | |
download | fsf-binutils-gdb-549dfc51b07c0c749ebde15a3fa855ab496ea18a.zip fsf-binutils-gdb-549dfc51b07c0c749ebde15a3fa855ab496ea18a.tar.gz fsf-binutils-gdb-549dfc51b07c0c749ebde15a3fa855ab496ea18a.tar.bz2 |
Constify some target_so_ops instances
This changes some target_so_ops instances to be const. This makes
their use a little more obvious (they can't be mutated) and also
allows for the removal of some initialization code.
Diffstat (limited to 'gdb/solib-frv.c')
-rw-r--r-- | gdb/solib-frv.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gdb/solib-frv.c b/gdb/solib-frv.c index df86b14..6ca303c 100644 --- a/gdb/solib-frv.c +++ b/gdb/solib-frv.c @@ -1129,21 +1129,23 @@ frv_fetch_objfile_link_map (struct objfile *objfile) return 0; } -struct target_so_ops frv_so_ops; +const struct target_so_ops frv_so_ops = +{ + frv_relocate_section_addresses, + frv_free_so, + nullptr, + frv_clear_solib, + frv_solib_create_inferior_hook, + frv_current_sos, + open_symbol_file_object, + frv_in_dynsym_resolve_code, + solib_bfd_open, +}; void _initialize_frv_solib (); void _initialize_frv_solib () { - frv_so_ops.relocate_section_addresses = frv_relocate_section_addresses; - frv_so_ops.free_so = frv_free_so; - frv_so_ops.clear_solib = frv_clear_solib; - frv_so_ops.solib_create_inferior_hook = frv_solib_create_inferior_hook; - frv_so_ops.current_sos = frv_current_sos; - frv_so_ops.open_symbol_file_object = open_symbol_file_object; - frv_so_ops.in_dynsym_resolve_code = frv_in_dynsym_resolve_code; - frv_so_ops.bfd_open = solib_bfd_open; - /* Debug this file's internals. */ add_setshow_zuinteger_cmd ("solib-frv", class_maintenance, &solib_frv_debug, _("\ |