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
diff --git a/linker/linker_soinfo.cpp b/linker/linker_soinfo.cpp
index 5f40528..d4b2541 100644
--- a/linker/linker_soinfo.cpp
+++ b/linker/linker_soinfo.cpp
@@ -550,6 +550,16 @@
   rtld_flags_ |= RTLD_NODELETE;
 }
 
+void soinfo::set_realpath(const char* path) {
+#if defined(__work_around_b_24465209__)
+  if (has_min_version(2)) {
+    realpath_ = path;
+  }
+#else
+  realpath_ = path;
+#endif
+}
+
 const char* soinfo::get_realpath() const {
 #if defined(__work_around_b_24465209__)
   if (has_min_version(2)) {