summaryrefslogtreecommitdiff
path: root/gdb/nios2-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/nios2-linux-tdep.c
parent4eb629d50d449a079d3f5e22f26f45855939164f (diff)
downloadbinutils-gdb-c0154a4a21a3aed01ef53877af05cf0109a0b124.tar.gz
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/nios2-linux-tdep.c')
-rw-r--r--gdb/nios2-linux-tdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/nios2-linux-tdep.c b/gdb/nios2-linux-tdep.c
index 661c8b38f72..bd86146c878 100644
--- a/gdb/nios2-linux-tdep.c
+++ b/gdb/nios2-linux-tdep.c
@@ -226,7 +226,7 @@ nios2_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
set_solib_svr4_fetch_link_map_offsets (gdbarch,
- svr4_ilp32_fetch_link_map_offsets);
+ linux_ilp32_fetch_link_map_offsets);
/* Enable TLS support. */
set_gdbarch_fetch_tls_load_module_address (gdbarch,
svr4_fetch_objfile_link_map);