summaryrefslogtreecommitdiff
path: root/linker/linker.cpp
diff options
context:
space:
mode:
authorDimitry Ivanov <dimitry@google.com>2015-10-13 20:37:55 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-10-13 20:37:55 +0000
commit30cd7065b6cd37342e23904cb512c409b8bbd4f1 (patch)
tree0e69cd361e7de4ce1e0129195901602787160997 /linker/linker.cpp
parentfb7f45b6a3242c9a9a547705de08cf59e6b7f935 (diff)
parent6f2d3104c82f81c1f0123a3cfb25ae670841d0ba (diff)
Merge "Correctly resolve realpath for absolute paths"
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r--linker/linker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 841b9575f..4e899c312 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -1318,6 +1318,10 @@ static int open_library(ZipArchiveCache* zip_archive_cache,
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;
}