diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2015-05-28 11:44:31 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2015-05-28 15:28:41 -0700 |
commit | ca10ac6dd45f73752e8822fee606d83116a5721a (patch) | |
tree | d4f31d38da59d94d7c1cccee59e3456cb9e6c007 /linker | |
parent | 4a7c3af054fdb525c8e458434f57f20696f43e31 (diff) | |
download | bionic-ca10ac6dd45f73752e8822fee606d83116a5721a.zip bionic-ca10ac6dd45f73752e8822fee606d83116a5721a.tar.gz bionic-ca10ac6dd45f73752e8822fee606d83116a5721a.tar.bz2 |
Improve some of error/warning messages
Bug: http://b/20464031
Change-Id: I948141c46f9e054fc45f5934153dee56ce3cd558
(cherry picked from commit 087005f37e02b48809746947159d824493885b1e)
Diffstat (limited to 'linker')
-rw-r--r-- | linker/linker.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index e8bebff..764b5cc 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -331,6 +331,7 @@ static bool realpath_fd(int fd, std::string* realpath) { std::vector<char> buf(PATH_MAX), proc_self_fd(PATH_MAX); snprintf(&proc_self_fd[0], proc_self_fd.size(), "/proc/self/fd/%d", fd); if (readlink(&proc_self_fd[0], &buf[0], buf.size()) == -1) { + PRINT("readlink('%s') failed: %s [fd=%d]", &proc_self_fd[0], strerror(errno), fd); return false; } @@ -1287,7 +1288,7 @@ static soinfo* load_library(int fd, off64_t file_offset, std::string realpath = name; if (!realpath_fd(fd, &realpath)) { - PRINT("cannot resolve realpath for the library \"%s\": %s", name, strerror(errno)); + PRINT("warning: unable to get realpath for the library \"%s\". Will use given name.", name); realpath = name; } @@ -2761,7 +2762,7 @@ bool soinfo::prelink_image() { set_dt_flags_1(d->d_un.d_val); if ((d->d_un.d_val & ~SUPPORTED_DT_FLAGS_1) != 0) { - DL_WARN("Unsupported flags DT_FLAGS_1=%p", reinterpret_cast<void*>(d->d_un.d_val)); + DL_WARN("%s: unsupported flags DT_FLAGS_1=%p", get_realpath(), reinterpret_cast<void*>(d->d_un.d_val)); } break; #if defined(__mips__) |