Commit graph

18 commits

Author SHA1 Message Date
Jiyong Park
8537781cc7 Hide non-bridged/bridged namespaces behind NativeLoaderNamespace class
NativeLoaderNamespace fully abstracts the non-bridged (so called
android-) and bridged namespaces.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I3d5ca7515711e7638f4a5ab4d3a150185c3d17ac
2019-05-16 08:55:04 +09:00
Jiyong Park
40a6077244 Move public libraries list to a separate source file
Functions for reading the public libraries list are moved out of
library_namespace.cpp to public_libraries.cpp.

In addition, library-local symbols are moved from android namespace to
android::nativeloader namespace.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: If82419598304d56d29bfec4ef553443c788d0f53
2019-05-08 13:49:42 +09:00
Jiyong Park
6291da2936 move classes out of native_loader.cpp
native_loader.cpp is too crowded. Move the classes
NativeLoaderNamespaces and LibraryNamespaces out of native_loader.cpp to
their own source files.

This change does not alter any functionality.

Bug: 130388701
Test: m, presubmit tests
Change-Id: Ibc61ec0dc6727af7cac865b1971ebf1befac6855
2019-05-04 01:10:42 +09:00
dimitry
0c11941468 Add dependency on libdl_android
platform private symbols have been moved to libdl_android.so
since they are not intended to be accessible from apps.

Test: make
Bug: http://b/129387775
Change-Id: I883a6d2ca588a258dd43efa766fad4e07428594e
(cherry picked from commit e3d0383d38)
2019-03-28 12:52:27 +01:00
Orion Hodson
34b126b98b Remove dependency on libcutils
libnativeloader is in the Runtime Module, libcutils is not.

Dependency was on property_get so moving to libbase equivalent.

Bug: b/125323247
Test: m -j100
Change-Id: I295ffa14b475a193a851db89dbb3b4c9cc0183d2
2019-02-22 08:55:48 +00:00
Jiyong Park
00f2ebe9cc shim libraries for libnativeloader and libnativebridge
libnativeloader_lazy and libnativebridge_lazy are shim libraries for
libnativeloader and libnativebridge, respectively.

The shim libraries provides the same APIs as their counterparts, but
when the APIs are called, the APIs from the real libraries are
loaded/linked/and executed using dlopen/dlsym.

Bug: 123403798
Bug: 124250621
Test: m
Test: device boots to the UI
Test: mma under system/core/libnativebridge with aosp_cf_x86
adb sync; execute all tests under
/data/nativetest/libnativebridge-lazy-tests
All passes except NativeBridgeTest.V2_Signal which is also failing
in /data/nativetest/libnativebridge-tests.

Change-Id: Ic6484784eaa7872dcdd2decbb30943fb34c1abd7
2019-02-12 19:35:45 +09:00
Martin Stjernholm
a015ad2779 Revert^2 "Enable APEX stubs for libnativeloader."
This reverts commit 5c8c6a90fd.

Reason for revert: Another try with http://r.android.com/892234 in place.

Test: Flash and boot
Bug: 113373927
Change-Id: I508c217a177e9cdd65d8a405d1315aeeacabe18d
2019-02-07 15:23:49 +00:00
Martin Stjernholm
5c8c6a90fd Revert "Enable APEX stubs for libnativeloader."
This reverts commit 0daa405272.

Reason for revert: Breaks cf_x86_phone-userdebug: https://android-build.googleplex.com/builds/build-details/5273735/targets/cf_x86_phone-userdebug

Bug: 123700170
Change-Id: Id82a91f845120dd41ce02b6d7fef886a87eb23a8
2019-02-01 13:13:56 +00:00
Martin Stjernholm
0daa405272 Enable APEX stubs for libnativeloader.
Test: Flash and boot
Bug: 113373927
Change-Id: I61783b947031bb13f415e561e19cb90fa98d0ddd
2019-01-30 14:44:55 +00:00
Nicolas Geoffray
d06cb94d25 libnativeloader: remove stubs for now.
Seems to break VMDebug test.

Also add missed strdup in returned error message.

bug: 122957265
Test: VMDebug
Change-Id: I64727d707f20c0e6afcb5455edf20c99011a81dc
2019-01-16 21:40:34 +00:00
Nicolas Geoffray
c3a73dcd27 Move to C API of libnativeloader.
Test: m
Bug: 119840313
Bug: 122710865

(cherry picked from commit e1d970df09)

Merged-In: Id5b08ef5de0d38cb678a50e45d38dfb8107c4a1c
Change-Id: Ic82baa885caa5125dd3c8b5de854128c75f48caf

Exempt-From-Owner-Approval: Cherry-pick of approved CL in master.
2019-01-16 13:40:28 +00:00
Jiyong Park
9837d6be1f Don't install unnecessary VNDK libs
vndk_package is a phony module that includes ALL VNDK libs found in the
source code. As a result, VNDK libs that were actually not needed for
the device have been installed consuming storage. For example,
/system/lib/vndk/android.hardware.automotive*.so files were installed
even though walleye/taimen do not have automotive HALs.

VNDK libs are now installed by their link time dependencies (i.e. if a
vendor module uses libcutils, then /system/lib[64]/vndk-sp/libcutils.so
is automatically installed.).

By the way, there is a few number of VNDK libs that do not have any
link time dependency from vendor modules. They are always opened via
dlopen. In such cases, the vndk modules are added to `required`
or `LOCAL_REQUIRED_MODULES` of the module that dlopens them.

Bug: 67002788
Test: walleye builds and boots to the UI
Test: basic functionalities work (sound, camera, camcorder, slow-mo,
youtube, wifi, bluetooth)

Change-Id: I321256b9d20f20a9062c6d13b1745d8727eda558
2017-12-18 21:21:02 +09:00
Dan Willemsen
1e45d533b3 Remove default libraries
libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults
for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on
Linux.

Test: m host
Change-Id: I0b3c147b00a8ab6ff289b85db55b88836c905f5c
Exempt-From-Owner-Approval: build system cleanup
2017-09-29 13:17:06 -07:00
Lennart Wieboldt
cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Jaekyun Seok
86e80b9be0 Use shared lib of libutils, libz and libbase.
libutils, libz and libbase are being used as shared lib by many other
modules.
So using their shared lib will reduce total image size.

Size diffs on angler build image are as follows.

libziparchive.so  : 103844 -> 41680 (-62164)
libnativeloader.so:  50824 -> 25104 (-25720)
total             : (-87884)

Test: building succeeded, and the image was tested on angler.
Bug: 33056637
Change-Id: I015afe5b8f4d87d495b706e2e78d60f44a910e87
2016-12-22 07:03:26 +09: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
Elliott Hughes
36e0d390a2 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
2016-10-10 14:31:12 -07:00
Colin Cross
d4ce20aa84 libnativeloader: convert Android.mk to Android.bp
Change-Id: I94d7cde3138f28bbd158d62b657af8448b4175fd
2016-07-27 10:36:36 -07:00