Improve the dynamic linker diagnostics.

Lose the pid, only show the name of the function (not its whole signature),
and include the name of the library we failed to load. (I hadn't noticed
that the library name was missing before because in Java we add that into
the UnsatisfiedLinkError detail message.)

The new output looks like this:

  Cannot load library: soinfo_relocate(linker.cpp:968): cannot locate symbol "__libc_malloc_default_dispatch" referenced by "libc_malloc_debug_leak.so"...

Change-Id: I3bb5c9780d9aaf3a9e4418ea55bc98122a81f80f
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 9d882a8..46d1335 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -162,12 +162,12 @@
 static char tmp_err_buf[768];
 static char __linker_dl_err_buf[768];
 #define BASENAME(s) (strrchr(s, '/') != NULL ? strrchr(s, '/') + 1 : s)
-#define DL_ERR(fmt, x...)                                                     \
-    do {                                                                      \
-        format_buffer(__linker_dl_err_buf, sizeof(__linker_dl_err_buf),       \
-            "(%s:%d, pid %d) %s: " fmt,                                       \
-            BASENAME(__FILE__), __LINE__, pid, __func__, ##x);                \
-        ERROR(fmt "\n", ##x);                                                 \
+#define DL_ERR(fmt, x...) \
+    do { \
+        format_buffer(__linker_dl_err_buf, sizeof(__linker_dl_err_buf), \
+                      "%s(%s:%d): " fmt, \
+                      __FUNCTION__, BASENAME(__FILE__), __LINE__, ##x); \
+        ERROR(fmt "\n", ##x); \
     } while(0)
 
 const char *linker_get_error(void)
@@ -972,7 +972,7 @@
                    reference..   */
                 s = &symtab[sym];
                 if (ELF32_ST_BIND(s->st_info) != STB_WEAK) {
-                    DL_ERR("cannot locate \"%s\"...", sym_name);
+                    DL_ERR("cannot locate symbol \"%s\" referenced by \"%s\"...", sym_name, si->name);
                     return -1;
                 }