summaryrefslogtreecommitdiff
path: root/gdb/mips-linux-tdep.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-05-16 14:07:56 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-05-16 14:07:56 +0000
commit306ebf2edfbc9085bb61e6734a9849b809cdd915 (patch)
treea22985ef3b9126d2ba36ee60d3e1992688122a90 /gdb/mips-linux-tdep.c
parent0b585e6634de62991a3e3a937165885f3f958a20 (diff)
downloadgdb-306ebf2edfbc9085bb61e6734a9849b809cdd915.tar.gz
* 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 4ca20ac90c8..ff0b124d7d7 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