aboutsummaryrefslogtreecommitdiff
path: root/gdb/mips-linux-tdep.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2021-08-16 16:17:25 -0700
committerH.J. Lu <hjl.tools@gmail.com>2021-08-17 07:05:57 -0700
commitc0154a4a21a3aed01ef53877af05cf0109a0b124 (patch)
tree206fc433b66b3caa20711524ec3beff97a4c8eb3 /gdb/mips-linux-tdep.c
parent4eb629d50d449a079d3f5e22f26f45855939164f (diff)
downloadgdb-c0154a4a21a3aed01ef53877af05cf0109a0b124.zip
gdb-c0154a4a21a3aed01ef53877af05cf0109a0b124.tar.gz
gdb-c0154a4a21a3aed01ef53877af05cf0109a0b124.tar.bz2
gdb: Don't assume r_ldsomap when r_version > 1 on Linux
The r_ldsomap field is specific to Solaris (part of librtld_db), and should never be accessed for Linux. glibc is planning to add a field to support multiple namespaces. But there will be no r_ldsomap when r_version is bumped to 2. Add linux_[ilp32|lp64]_fetch_link_map_offsets to set r_ldsomap_offset to -1 and use them for Linux targets. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28236
Diffstat (limited to 'gdb/mips-linux-tdep.c')
-rw-r--r--gdb/mips-linux-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/mips-linux-tdep.c b/gdb/mips-linux-tdep.c
index 1ceed52..ce287f6 100644
--- a/gdb/mips-linux-tdep.c
+++ b/gdb/mips-linux-tdep.c
@@ -1542,7 +1542,7 @@ mips_linux_init_abi (struct gdbarch_info info,
set_gdbarch_get_longjmp_target (gdbarch,
mips_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+ (gdbarch, linux_ilp32_fetch_link_map_offsets);
tramp_frame_prepend_unwinder (gdbarch, &micromips_linux_o32_sigframe);
tramp_frame_prepend_unwinder (gdbarch,
&micromips_linux_o32_rt_sigframe);
@@ -1554,7 +1554,7 @@ mips_linux_init_abi (struct gdbarch_info info,
set_gdbarch_get_longjmp_target (gdbarch,
mips_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+ (gdbarch, linux_ilp32_fetch_link_map_offsets);
set_gdbarch_long_double_bit (gdbarch, 128);
/* These floatformats should probably be renamed. MIPS uses
the same 128-bit IEEE floating point format that IA-64 uses,
@@ -1570,7 +1570,7 @@ mips_linux_init_abi (struct gdbarch_info info,
set_gdbarch_get_longjmp_target (gdbarch,
mips64_linux_get_longjmp_target);
set_solib_svr4_fetch_link_map_offsets
- (gdbarch, svr4_lp64_fetch_link_map_offsets);
+ (gdbarch, linux_lp64_fetch_link_map_offsets);
set_gdbarch_long_double_bit (gdbarch, 128);
/* These floatformats should probably be renamed. MIPS uses
the same 128-bit IEEE floating point format that IA-64 uses,