summaryrefslogtreecommitdiffstats
path: root/linker
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-11-01 23:01:57 -0700
committerGerrit Code Review <noreply-gerritcodereview@google.com>2012-11-01 23:01:58 -0700
commitdc77a22850e31eb369ec9776c13c967566bf61d0 (patch)
tree0d2b4800e7b56894d7b46bb9cd9c57809f59804a /linker
parente3c7b5192e65eeb0bd90bf884d3435ed9adfad0e (diff)
parent6971fe4ca52ebdaa85ba676a044412b01d2ef1bf (diff)
downloadbionic-dc77a22850e31eb369ec9776c13c967566bf61d0.zip
bionic-dc77a22850e31eb369ec9776c13c967566bf61d0.tar.gz
bionic-dc77a22850e31eb369ec9776c13c967566bf61d0.tar.bz2
Merge "Allow dlopen("egl/blah.so")."
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 99cd92b..40f29a2 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -634,7 +634,11 @@ static int open_library(const char* name) {
// If the name contains a slash, we should attempt to open it directly and not search the paths.
if (strchr(name, '/') != NULL) {
- return TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC));
+ int fd = TEMP_FAILURE_RETRY(open(name, O_RDONLY | O_CLOEXEC));
+ if (fd != -1) {
+ return fd;
+ }
+ // ...but nvidia binary blobs (at least) rely on this behavior, so fall through for now.
}
// Otherwise we try LD_LIBRARY_PATH first, and fall back to the built-in well known paths.