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:37:00 +0000 (14:37 -0700)
commitbb8b22a087db32773f1a9cd3473061f3ad714afc
treefa6f779e0a0edafab547490feb59ece32c54a733
parent07e75fe9a1cbf323b5de168448583ed66211efe0
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
linker/linker.cpp
tests/dlext_test.cpp