commit | 6f2d3104c82f81c1f0123a3cfb25ae670841d0ba | [log] [tgz] |
---|---|---|
author | Lazar Trsic <Lazar.Trsic@imgtec.com> | Tue Oct 13 16:43:00 2015 +0200 |
committer | Dmitriy Ivanov <dimitry@google.com> | Tue Oct 13 10:57:41 2015 -0700 |
tree | 0e69cd361e7de4ce1e0129195901602787160997 | |
parent | fb7f45b6a3242c9a9a547705de08cf59e6b7f935 [diff] |
Correctly resolve realpath for absolute paths Introduced by: https://android-review.googlesource.com/174475 Change-Id: I44e00040b28be167d5141454f919340afec6084e
diff --git a/linker/linker.cpp b/linker/linker.cpp index 841b957..4e899c3 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp
@@ -1318,6 +1318,10 @@ int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC)); if (fd != -1) { *file_offset = 0; + if (!realpath_fd(fd, realpath)) { + PRINT("warning: unable to get realpath for the library \"%s\". Will use given path.", name); + *realpath = name; + } } return fd; }