diff options
author | Dmitriy Ivanov <dimitry@google.com> | 2015-03-17 17:12:18 -0700 |
---|---|---|
committer | Dmitriy Ivanov <dimitry@google.com> | 2015-03-18 10:32:11 -0700 |
commit | e44fffd7f9b93b9ec9836cfc7acedf7e21107f8f (patch) | |
tree | 10208ea0b8efaa151376052354e6cbd3be28a952 /linker/linker.cpp | |
parent | c0eaa732844a8397d40a7ec82641f709e4b47a61 (diff) | |
download | android_bionic-e44fffd7f9b93b9ec9836cfc7acedf7e21107f8f.tar.gz android_bionic-e44fffd7f9b93b9ec9836cfc7acedf7e21107f8f.tar.bz2 android_bionic-e44fffd7f9b93b9ec9836cfc7acedf7e21107f8f.zip |
Fix library lookup for filenames with slash.
If filename contains a slash, then it is interpreted
as a (relative or absolute) pathname.
Bug: https://code.google.com/p/android/issues/detail?id=6670
Change-Id: Iba57d638301f3089ad47ba083edca2dd36b801ed
Diffstat (limited to 'linker/linker.cpp')
-rw-r--r-- | linker/linker.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp index 15ea423f9..3960f9aa8 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -942,12 +942,8 @@ static int open_library(const char* name, off64_t* file_offset) { int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC)); if (fd != -1) { *file_offset = 0; - return fd; } - // ...but nvidia binary blobs (at least) rely on this behavior, so fall through for now. -#if defined(__LP64__) - return -1; -#endif + return fd; } // Otherwise we try LD_LIBRARY_PATH first, and fall back to the built-in well known paths. |