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/linux-tdep.h | |
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/linux-tdep.h')
-rw-r--r-- | gdb/linux-tdep.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index 28b60e4..b5c1184 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -98,4 +98,9 @@ extern CORE_ADDR linux_get_hwcap (struct target_ops *target); error, 0 is returned. */ extern CORE_ADDR linux_get_hwcap2 (struct target_ops *target); +/* Fetch (and possibly build) an appropriate `struct link_map_offsets' + for ILP32 and LP64 Linux systems. */ +extern struct link_map_offsets *linux_ilp32_fetch_link_map_offsets (); +extern struct link_map_offsets *linux_lp64_fetch_link_map_offsets (); + #endif /* linux-tdep.h */ |