summaryrefslogtreecommitdiff
path: root/libc/malloc_hooks/malloc_hooks.cpp
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2019-06-04 20:56:56 -0700
committerRyan Prichard <rprichard@google.com>2019-06-05 18:02:40 -0700
commitcf9ed12d107c05acfec5a4fbf70c416bfd34a2b3 (patch)
tree11ab821a3d69569a9b24707e63aafed48a67a187 /libc/malloc_hooks/malloc_hooks.cpp
parentc3c492965995a2bd5cfe12846f5038c4d7d2c91e (diff)
Use PT_INTERP as the linker's l_name path
Ordinary executables have a PT_INTERP path of /system/bin/linker[64], but: - executables using bootstrap Bionic use /system/bin/bootstrap/linker[64] - ASAN executables use /system/bin/linker_asan[64] gdb appears to use the PT_INTERP path for debugging the dynamic linker before the linker has initialized the r_debug module list. If the linker's l_name differs from PT_INTERP, then gdb assumes that the linker has been unloaded and searches for a new solib using the linker's l_name path. gdb may print a warning like: warning: Temporarily disabling breakpoints for unloaded shared library "$OUT/symbols/system/bin/linker64" If I'm currently debugging the linker when this happens, gdb apparently doesn't load debug symbols for the linker. This can be worked around with gdb's "sharedlibrary" command, but it's better to avoid it. Previously, when PT_INTERP was the bootstrap linker, but l_name was "/system/bin/linker[64]", gdb would find the default non-bootstrap linker binary and (presumably) get confused about symbol addresses. (Also, remove the "static std::string exe_path" variable because the soinfo::realpath_ field is a std::string that already lasts until exit. We already use it for link_map_head.l_name in notify_gdb_of_load.) Bug: http://b/134183407 Test: manual Change-Id: I9a95425a3a5e9fd01e9dd272273c6ed3667dbb9a
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
0 files changed, 0 insertions, 0 deletions