diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-08-16 16:17:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-08-17 07:05:57 -0700 |
commit | c0154a4a21a3aed01ef53877af05cf0109a0b124 (patch) | |
tree | 206fc433b66b3caa20711524ec3beff97a4c8eb3 /gdb/amd64-linux-tdep.c | |
parent | 4eb629d50d449a079d3f5e22f26f45855939164f (diff) | |
download | gdb-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/amd64-linux-tdep.c')
-rw-r--r-- | gdb/amd64-linux-tdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/amd64-linux-tdep.c b/gdb/amd64-linux-tdep.c index ac6843c..715add8 100644 --- a/gdb/amd64-linux-tdep.c +++ b/gdb/amd64-linux-tdep.c @@ -2042,7 +2042,7 @@ amd64_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* GNU/Linux uses SVR4-style shared libraries. */ set_solib_svr4_fetch_link_map_offsets - (gdbarch, svr4_lp64_fetch_link_map_offsets); + (gdbarch, linux_lp64_fetch_link_map_offsets); /* Register DTrace handlers. */ set_gdbarch_dtrace_parse_probe_argument (gdbarch, amd64_dtrace_parse_probe_argument); @@ -2256,7 +2256,7 @@ amd64_x32_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) /* GNU/Linux uses SVR4-style shared libraries. */ set_solib_svr4_fetch_link_map_offsets - (gdbarch, svr4_ilp32_fetch_link_map_offsets); + (gdbarch, linux_ilp32_fetch_link_map_offsets); } void _initialize_amd64_linux_tdep (); |