* Makefile.in (linuw_low_h): Move higher.
[binutils-gdb.git] / gdb / solib-null.c
blob95cc0f9c727aa89fcdf5364ca7829782dccf9600
1 /* Definitions for targets without shared libraries for GDB, the GNU Debugger.
3 Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 #include "defs.h"
21 #include "solist.h"
23 static struct so_list *
24 null_current_sos (void)
26 return NULL;
29 static void
30 null_special_symbol_handling (void)
34 static void
35 null_solib_create_inferior_hook (void)
39 static void
40 null_clear_solib (void)
44 static void
45 null_free_so (struct so_list *so)
47 xfree (so->lm_info);
51 static void
52 null_relocate_section_addresses (struct so_list *so,
53 struct section_table *sec)
57 static int
58 null_open_symbol_file_object (void *from_ttyp)
60 return 0;
63 static int
64 null_in_dynsym_resolve_code (CORE_ADDR pc)
66 return 0;
69 static struct target_so_ops null_so_ops;
71 extern initialize_file_ftype _initialize_null_solib; /* -Wmissing-prototypes */
73 void
74 _initialize_null_solib (void)
76 null_so_ops.relocate_section_addresses = null_relocate_section_addresses;
77 null_so_ops.free_so = null_free_so;
78 null_so_ops.clear_solib = null_clear_solib;
79 null_so_ops.solib_create_inferior_hook = null_solib_create_inferior_hook;
80 null_so_ops.special_symbol_handling = null_special_symbol_handling;
81 null_so_ops.current_sos = null_current_sos;
82 null_so_ops.open_symbol_file_object = null_open_symbol_file_object;
83 null_so_ops.in_dynsym_resolve_code = null_in_dynsym_resolve_code;
85 /* Set current_target_so_ops to null_so_ops if not already set. */
86 if (current_target_so_ops == 0)
87 current_target_so_ops = &null_so_ops;