OSDN Git Service

loader: enable loading libraries from tmpfs
authorDimitry Ivanov <dimitry@google.com>
Fri, 21 Apr 2017 20:12:05 +0000 (13:12 -0700)
committerDimitry Ivanov <dimitry@google.com>
Fri, 21 Apr 2017 21:45:07 +0000 (14:45 -0700)
commitbf34ba364186fc1ffbeada28740640cb4498e7a0
treec26639a2a947bf1219eabe64af6d03a5bb316f86
parente54e64bd605f74936e1b8b6f5bf525b77abba00d
loader: enable loading libraries from tmpfs

This change adds two tests for dlopen from temporary files.
1. One Uses memfd_create() can be used to load libraries directly
from memory. This requires relaxing namespace accessibility check
in order to make this work in isolated namespaces.
2. Another checks that open with O_TMPFILE works.

Bug: http://b/37245203
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I3be1d7198ca17e7f1ba022a0d86c64d59a493506
(cherry picked from commit bb8b22a087db32773f1a9cd3473061f3ad714afc)
linker/linker.cpp
tests/dlext_test.cpp