aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-linux-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-05-16 14:07:56 +0000
committerDaniel Jacobowitz <drow@false.org>2007-05-16 14:07:56 +0000
commit7d522c902eb745c9d99e88d1c62c7bb4d23f4ddd (patch)
treebd64c8954b4630d7cfc96b2d6b2cea940315bdb5 /gdb/mips-linux-tdep.c
parent5d51a2dbdbe9975039c68f7b571c46931783a775 (diff)
downloadgdb-7d522c902eb745c9d99e88d1c62c7bb4d23f4ddd.zip
gdb-7d522c902eb745c9d99e88d1c62c7bb4d23f4ddd.tar.gz
gdb-7d522c902eb745c9d99e88d1c62c7bb4d23f4ddd.tar.bz2
* config/mips/linux.mt (DEPRECATED_TM_FILE): Delete.
* config/mips/tm-linux.h: Delete. * mips-linux-tdep.c (mips_svr4_so_ops): New. (mips_linux_in_dynsym_resolve_code): Make static. Use svr4_in_dynsym_resolve_code. (mips_linux_init_abi): Initialize mips_svr4_so_ops. Call set_solib_ops. * solib-svr4.c (svr4_in_dynsym_resolve_code, svr4_so_ops): Make global. * solib-svr4.h (svr4_so_ops, svr4_in_dynsym_resolve_code): Declare. * Makefile.in (mips-linux-tdep.o): Update. * solib.c (set_solib_ops): New. (current_target_so_ops): Update comment. * solib.h (set_solib_ops): New prototype.
Diffstat (limited to 'gdb/mips-linux-tdep.c')
-rw-r--r--gdb/mips-linux-tdep.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 4ca20ac..ff0b124 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -34,9 +34,13 @@
#include "tramp-frame.h"
#include "gdbtypes.h"
#include "solib.h"
+#include "solib-svr4.h"
+#include "solist.h"
#include "symtab.h"
#include "mips-linux-tdep.h"
+static struct target_so_ops mips_svr4_so_ops;
+
/* Figure out where the longjmp will land.
We expect the first arg to be a pointer to the jmp_buf structure
from which we extract the pc (MIPS_LINUX_JB_PC) that we will land
@@ -617,12 +621,12 @@ mips_linux_in_dynsym_stub (CORE_ADDR pc, char *name)
/* Return non-zero iff PC belongs to the dynamic linker resolution
code or to a stub. */
-int
+static int
mips_linux_in_dynsym_resolve_code (CORE_ADDR pc)
{
/* Check whether PC is in the dynamic linker. This also checks
whether it is in the .plt section, which MIPS does not use. */
- if (in_solib_dynsym_resolve_code (pc))
+ if (svr4_in_dynsym_resolve_code (pc))
return 1;
/* Pattern match for the stub. It would be nice if there were a
@@ -1060,6 +1064,16 @@ mips_linux_init_abi (struct gdbarch_info info,
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);
+
+ /* Initialize this lazily, to avoid an initialization order
+ dependency on solib-svr4.c's _initialize routine. */
+ if (mips_svr4_so_ops.in_dynsym_resolve_code == NULL)
+ {
+ mips_svr4_so_ops = svr4_so_ops;
+ mips_svr4_so_ops.in_dynsym_resolve_code
+ = mips_linux_in_dynsym_resolve_code;
+ }
+ set_solib_ops (gdbarch, &mips_svr4_so_ops);
}
void