aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-10-24 21:18:52 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-10-24 21:18:52 +0000
commit59215afbea47b0845a7fe36534c37e7ce02065bf (patch)
tree28e5a7a7adb90271738820b1cde589c60420bbf3 /gdb
parent4bd1a3c93195c4a5d29094ae4242ba9fef9fdf7a (diff)
downloadgdb-59215afbea47b0845a7fe36534c37e7ce02065bf.zip
gdb-59215afbea47b0845a7fe36534c37e7ce02065bf.tar.gz
gdb-59215afbea47b0845a7fe36534c37e7ce02065bf.tar.bz2
* i386-nto-tdep.c: Include "solib.h".
(i386nto_init_abi): Use set_solib_ops instead of overwriting current_target_so_ops members. * solist.h (TARGET_SO_RELOCATE_SECTION_ADDRESSES): Remove. (TARGET_SO_FIND_AND_OPEN_SOLIB): Remove. (TARGET_SO_IN_DYNSYM_RESOLVE_CODE): Remove. * Makefile.in: Update dependencies.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/Makefile.in3
-rw-r--r--gdb/i386-nto-tdep.c25
-rw-r--r--gdb/solist.h7
4 files changed, 31 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4286528..dddaa24 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,15 @@
2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
+ * i386-nto-tdep.c: Include "solib.h".
+ (i386nto_init_abi): Use set_solib_ops instead of overwriting
+ current_target_so_ops members.
+ * solist.h (TARGET_SO_RELOCATE_SECTION_ADDRESSES): Remove.
+ (TARGET_SO_FIND_AND_OPEN_SOLIB): Remove.
+ (TARGET_SO_IN_DYNSYM_RESOLVE_CODE): Remove.
+ * Makefile.in: Update dependencies.
+
+2007-10-24 Ulrich Weigand <uweigand@de.ibm.com>
+
* arm-wince-tdep.c: Include "solib.h" and "solib-target.h".
(arm_wince_init_abi): Call set_solib_ops.
* i386-cygwin-tdep.c: Include "solib.h" and "solib-target.h".
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index cc11cfa..d68a502 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -2157,7 +2157,8 @@ i386nbsd-tdep.o: i386nbsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
$(nbsd_tdep_h) $(solib_svr4_h)
i386-nto-tdep.o: i386-nto-tdep.c $(defs_h) $(frame_h) $(osabi_h) \
$(regcache_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \
- $(i386_tdep_h) $(i387_tdep_h) $(nto_tdep_h) $(solib_svr4_h)
+ $(i386_tdep_h) $(i387_tdep_h) $(nto_tdep_h) $(solib_h) \
+ $(solib_svr4_h)
i386obsd-nat.o: i386obsd-nat.c $(defs_h) $(gdbcore_h) $(regcache_h) \
$(target_h) $(i386_tdep_h) $(i386bsd_nat_h) $(bsd_kvm_h)
i386obsd-tdep.o: i386obsd-tdep.c $(defs_h) $(arch_utils_h) $(frame_h) \
diff --git a/gdb/i386-nto-tdep.c b/gdb/i386-nto-tdep.c
index 19729b6..1f04946 100644
--- a/gdb/i386-nto-tdep.c
+++ b/gdb/i386-nto-tdep.c
@@ -31,6 +31,7 @@
#include "i386-tdep.h"
#include "i387-tdep.h"
#include "nto-tdep.h"
+#include "solib.h"
#include "solib-svr4.h"
/* Target vector for QNX NTO x86. */
@@ -251,6 +252,7 @@ static void
i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
{
struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
+ static struct target_so_ops nto_svr4_so_ops;
/* Deal with our strange signals. */
nto_initialize_signals ();
@@ -277,14 +279,25 @@ i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_solib_svr4_fetch_link_map_offsets
(gdbarch, svr4_ilp32_fetch_link_map_offsets);
- /* Our loader handles solib relocations slightly differently than svr4. */
- TARGET_SO_RELOCATE_SECTION_ADDRESSES = nto_relocate_section_addresses;
+ /* Initialize this lazily, to avoid an initialization order
+ dependency on solib-svr4.c's _initialize routine. */
+ if (nto_svr4_so_ops.in_dynsym_resolve_code == NULL)
+ {
+ nto_svr4_so_ops = svr4_so_ops;
+
+ /* Our loader handles solib relocations differently than svr4. */
+ nto_svr4_so_ops.relocate_section_addresses
+ = nto_relocate_section_addresses;
- /* Supply a nice function to find our solibs. */
- TARGET_SO_FIND_AND_OPEN_SOLIB = nto_find_and_open_solib;
+ /* Supply a nice function to find our solibs. */
+ nto_svr4_so_ops.find_and_open_solib
+ = nto_find_and_open_solib;
- /* Our linker code is in libc. */
- TARGET_SO_IN_DYNSYM_RESOLVE_CODE = nto_in_dynsym_resolve_code;
+ /* Our linker code is in libc. */
+ nto_svr4_so_ops.in_dynsym_resolve_code
+ = nto_in_dynsym_resolve_code;
+ }
+ set_solib_ops (gdbarch, &nto_svr4_so_ops);
nto_set_target (&i386_nto_target);
}
diff --git a/gdb/solist.h b/gdb/solist.h
index 3892879..279f1ad 100644
--- a/gdb/solist.h
+++ b/gdb/solist.h
@@ -129,13 +129,6 @@ extern int solib_open (char *in_pathname, char **found_pathname);
/* FIXME: gdbarch needs to control this variable */
extern struct target_so_ops *current_target_so_ops;
-#define TARGET_SO_RELOCATE_SECTION_ADDRESSES \
- (current_target_so_ops->relocate_section_addresses)
-#define TARGET_SO_FIND_AND_OPEN_SOLIB \
- (current_target_so_ops->find_and_open_solib)
-#define TARGET_SO_IN_DYNSYM_RESOLVE_CODE \
- (current_target_so_ops->in_dynsym_resolve_code)
-
/* Handler for library-specific global symbol lookup in solib.c. */
struct symbol *solib_global_lookup (const struct objfile *objfile,
const char *name,