Commit graph

13 commits

Author SHA1 Message Date
Dimitry Ivanov
9e253ce6b7 Explicitly enable greylist for classloader-namespaces
The linker no longer enables greylist by default, it
needs to be explicitly enabled by specifying corresponding
flag.

Bug: https://issuetracker.google.com/38146125
Test: builds
Change-Id: Ib593f2d9a35dbadffb436f5fbc9a2a7a8f64ada0
(cherry picked from commit 058b2ea8c5)
2017-05-09 18:00:38 -07:00
Dimitry Ivanov
3f5b5dc546 Add comment to android_link_namespaces method
Test: n/a - comment only change
Bug: http://b/26833548
Change-Id: I40356eec37aeb864206982feb877c59c21c9a433
2017-02-13 08:52:35 -08:00
Dimitry Ivanov
26e1a846ef Replace public library list with shared lib sonames
Call updated interface in order to setup anonymous and classloader
namespaces

Bug: http://b/26833548
Test: build & boot angler
Change-Id: I1fae5d9c015f2026563eb64d986c622c1b68effb
2017-02-06 14:26:56 -08:00
Jesse Hall
e7005979c2 dlext_namespace.h: Declare android_get_LD_LIBRARY_PATH
This allows clients creating their own namespace do so by modifying
the default library path, rather than hardcoding it multiple places in
the system.

Bug: 33531483
Test: build
Change-Id: I321e219392b38c235b220986e1520b49a4669863
(cherry picked from commit 823c266a8a)
2017-02-02 11:36:14 -08:00
Jesse Hall
b75d82b42a Make dlext_namespaces.h available to users of libnativeloader
Bug: 33531483
Test: build
Change-Id: I1da92e2b1437b6775a9d81fc6c1a2d4bacecbc04
(cherry picked from commit 0936d25371)
2017-02-02 11:36:04 -08:00
Zhenhua WANG
f2804e5985 Upgrade native bridge to version 3 to support namespace
Native bridge implements namespace related interfaces in version 3.
The namespace semantic here is same as Android dynamic linker's.
Native loader wraps library loading functions of dynamic linker and
native bridge. Thus, Android runtime is able to load native library
of different ISA on one device by calling native loader directly.

Bug: http://b/28242460
Test: mm && make test-art-host -j48
Change-Id: Idde2b9d99fb6ebe547407c716b5478a231f745a7
Signed-off-by: Zhenhua WANG <zhenhua.wang@intel.com>
2016-10-25 11:11:38 -07:00
Dimitry Ivanov
09a516bf16 nativeloader: Add CloseNativeLibrary() method
This method is called by art on UnloadNativeLibraries()

Bug: http://b/28406866
Change-Id: Ibccff93c83d6ccd3d0a1c0294a64b09281b4e05e
2016-05-03 14:55:25 -07:00
Dimitry Ivanov
be4ca3afc0 nativeloader: Add Reset capabilities
In the case when VM is restarted all weak references
from the old VM become invalid. In such event NativeLoader
needs to clear the list of classloaders from old VM.

Bug: http://b/28453840
Bug: http://b/28449304
Change-Id: I2268c1e21cf940c57ddc5f0312f56b71aa702134
2016-05-02 10:43:16 -07:00
Dimitry Ivanov
4b0e963872 Move list of public libraries to a config file
This list contains libraries that should directly or indirectly
be accessible to apps for the platform. Note that this list is
not device specific but rather device class specific.

For now we have 2 separate lists; one for Android Phones and Tablets,
and another one for Android Wear devices.

Bug: http://b/27546414
Bug: http://b/22548808
Change-Id: I83de5e3cf67392d0e9af66f70123898bd5997146
2016-03-17 09:45:52 -07:00
Dimitry Ivanov
d047c925af Added function to explicitly initialize a namespace
This change replaces lazy get-or-create logic for
linker namespaces with the explicit one.

ApplicationLoaders.getClassLoader(..) is now resposible for
the namespace initialization for PathClassLoaders.

Bug: http://b/27189432
Bug: http://b/22548808
Change-Id: Ife987c3ca1db33a47c20f363a5ed61512be8b5a7
2016-02-25 11:33:32 -08:00
Dimitry Ivanov
426799d770 Add PreloadPublicNativeLibraries function
Shift responsibility of preloading native libraries to the user
of the library. This lets applications that do not use jni but
depend on libnative_loader.so to avoid unnecessary preloads of
public libraries which could be expensive.

Bug: http://b/27245894
Change-Id: I12a8100de5da639c068769bca21ecebff2b2d538
2016-02-24 23:30:27 +00:00
Dimitry Ivanov
f44ecde588 nativeloader: Export FindNamespaceByClassLoader
Bug: http://b/27189432
Change-Id: Ib80dcce949276ee620f601c47b20f783708e8e85
(cherry picked from commit 0cd10d83e4)
2016-02-23 11:50:44 -08:00
Elliott Hughes
2a7f7e0090 Move libnativeloader headers into libnativeloader.
Change-Id: I227676276da1b08a84486f29fb0e1502c8dbdf4a
(cherry picked from commit e2b4e1e00c)
2016-02-22 15:23:22 -08:00