Summary: | Don't assume r_ldsomap if r_version > 1 in debugger interface | ||
---|---|---|---|
Product: | gdb | Reporter: | H.J. Lu <hjl.tools> |
Component: | shlibs | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | carlos |
Priority: | P2 | ||
Version: | HEAD | ||
Target Milestone: | 12.1 | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
H.J. Lu
2021-08-16 22:08:01 UTC
(In reply to H.J. Lu from comment #0) > glibc is planning to bump r_version to support multiple namespaces. But > there is no r_ldsomap when r_version is bumped to 2. Agreed. The r_ldsomap is only present in Solaris (part of librtld_db), and should never be accessed for Linux. The entire layout of r_debug is OS-specific. Fixed for GDB 12 by commit c0154a4a21a3aed01ef53877af05cf0109a0b124 Author: H.J. Lu <hjl.tools@gmail.com> Date: Mon Aug 16 16:17:25 2021 -0700 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 Fixed. |