OSDN Git Service

android-x86/system-linkerconfig.git
4 years agoAdd product section for product interface enforcement
Justin Yun [Mon, 16 Dec 2019 08:47:02 +0000 (17:47 +0900)]
Add product section for product interface enforcement

If ro.product.vndk.version is defined, product partition will have
seprate section from system section.
Modules in /product allowed to use VNDKs only from /system partition.
Modules in /system or /system_ext are not allowed to link to the
libraries in /product.

Bug: 124024578
Bug: 120954888
Test: build with "PRODUCT_PRODUCT_VNDK_VERSION := current"
      check device boot and basic functions

Change-Id: I0f9cd8b27c56c6a786b10aa23ffc4b197cea714d

4 years agoTarget out directory
Kiyoung Kim [Mon, 30 Dec 2019 09:43:00 +0000 (18:43 +0900)]
Target out directory

Linkerconfig will generate more than 1 file, based on APEX modules and
emulation. To support this, linkerconfig should take out target
directory as argument rather than out target file.

Bug: 146993126
Test: m -j passed && Cuttlefish succeeded to boot
Change-Id: Iabc611ad0dc31a5ab5627356a8552796ab452d7e

4 years agoRemove VNDK version for using core variant libraries
Kiyoung Kim [Mon, 30 Dec 2019 01:51:10 +0000 (10:51 +0900)]
Remove VNDK version for using core variant libraries

In current, name of the file contains VNDK using core variant library
list goes with VNDK version like other library list files. However, this
list is dependent on the system image not the VNDK version. To meet this
condition, this file name should not contain VNDK version number to avoid confusion.
This change removes VNDK version number from the file name.

Bug: 142599349
Test: m -j passed && aosp_cf_x86_go_phone booted
Change-Id: Ie167639e5ae2bae2ad269ffde168cfa5ac7de217

4 years agoAdd --legacy for easy of testing
Jooyung Han [Mon, 23 Dec 2019 04:35:00 +0000 (13:35 +0900)]
Add --legacy for easy of testing

Generate linker config for targets which are not treble-ized.
This argument is only for test on host.

Test: m linkerconfig && linkerconfig --legacy --root $OUT --vndk R
Change-Id: Id1ca59de2016de2de6b9a52f1ac217edea7c71f0

4 years agoBuild linker configuration for recovery in build time
Kiyoung Kim [Thu, 19 Dec 2019 06:59:55 +0000 (15:59 +0900)]
Build linker configuration for recovery in build time

As recovery has not enough space for linkerconfig binary, and also
linker configuration for recovery is does not require any environmental
variables, so linker configuration for recovery better be generated
from build time. This change enables to build linker configuration for
recovery from build and install into recovery system/etc.

Bug: 146414198
Test: m -j passed
Test: Checked linker config generated under recovery's system/etc
Change-Id: I08b77aa96191d3ccb67f8b8ca8fd918ca126de92

4 years agoMerge "Do not build linkerconfig for recovery"
Kiyoung Kim [Wed, 18 Dec 2019 00:55:03 +0000 (00:55 +0000)]
Merge "Do not build linkerconfig for recovery"

4 years agoAdd Cronet namespace
Luke Huang [Tue, 17 Dec 2019 05:10:09 +0000 (13:10 +0800)]
Add Cronet namespace

Bug: 139397529
Test: build
Test: manual test with Cronet
Change-Id: I1728747fcb6e04bf528266957695378f8d2b28fa

4 years agoDo not build linkerconfig for recovery
Kiyoung Kim [Tue, 17 Dec 2019 06:23:38 +0000 (15:23 +0900)]
Do not build linkerconfig for recovery

Linkerconfig should be built as static, but recovery does not have
enough space for static binary. As recovery linker configuration is
quite static and simple, this can be generated from build time. As a
first step linkerconfig binary should be removed from recovery.

Bug: 146384333
Test: m -j passed && crosshatch recovery worked with this change
Change-Id: Ia4155c3295feb518bcfd0ab6e6eef8f794e0b1f9

4 years agos/ANROID/ANDROID
Josh Gao [Wed, 11 Dec 2019 23:28:30 +0000 (15:28 -0800)]
s/ANROID/ANDROID

Test: treehugger
Change-Id: If112b4dfd77d772c2feec2c931190d63bea7cb2b

4 years agoMerge "Read apex_manifest and generate Namespace"
Jooyung Han [Tue, 10 Dec 2019 05:09:45 +0000 (05:09 +0000)]
Merge "Read apex_manifest and generate Namespace"

4 years agoRead apex_manifest and generate Namespace
Jooyung Han [Fri, 6 Dec 2019 10:47:30 +0000 (19:47 +0900)]
Read apex_manifest and generate Namespace

Add a small utility to initialize a Namespace with APEX.
Until we can just scan all "activated" APEXes and generate all
namespaces with them, we could use this to fill in namespaces for
APEXes.

Bug: 144659031
Bug: 144659057
Test: atest --host linkerconfig_modules_unittest
Change-Id: If9787ff6c7bc680b5d778b03813103e661a2d0a0

4 years agoMerge "Remove unnecessary shared_lib for neuralnetworks"
Treehugger Robot [Mon, 9 Dec 2019 23:19:24 +0000 (23:19 +0000)]
Merge "Remove unnecessary shared_lib for neuralnetworks"

4 years agoLinker configuration for recovery
Kiyoung Kim [Thu, 5 Dec 2019 07:44:34 +0000 (16:44 +0900)]
Linker configuration for recovery

Implements linker configuration for recovery. Linkerconfig will generate
recovery configuration on --recovery argument.

Bug: 139638519
Test: m -j passed & tested from crosshatch
Change-Id: I02a38bde8075167dd67334d69507f2604b7d3b33

4 years agoRemove unnecessary shared_lib for neuralnetworks
Jooyung Han [Wed, 4 Dec 2019 14:57:58 +0000 (23:57 +0900)]
Remove unnecessary shared_lib for neuralnetworks

Because libneuralnetworks doesn't require libsync.so, remove it from
allowed shared_libs list.

Bug: 144659031
Test: CtsNNAPITestCases
Change-Id: Ica410d01dd54881b2e5cfdd32013c0f11caa0511

4 years agoMerge "Remove unnecessary shared_libs for resolv APEX"
Jooyung Han [Wed, 4 Dec 2019 13:27:36 +0000 (13:27 +0000)]
Merge "Remove unnecessary shared_libs for resolv APEX"

4 years agoRemove unnecessary shared_libs for resolv APEX
Jooyung Han [Tue, 3 Dec 2019 10:38:22 +0000 (19:38 +0900)]
Remove unnecessary shared_libs for resolv APEX

resolv APEX doesn't need libcgrouprc.so, liblog.so, and libvndksupport.so.

Bug: 144659031
Test: m && device boot
      atest --test-mapping system/netd
Change-Id: Ic06008b808a185f5f5662f1758363fe776dbda45

4 years agoAdd path to the boot image in the ART apex.
Ulya Trafimovich [Fri, 15 Nov 2019 14:10:02 +0000 (14:10 +0000)]
Add path to the boot image in the ART apex.

Test: m

Change-Id: Ia92ae90b7d80fab9ad87207c0f699292451e8578

4 years agoAdd jooyung to owners
Kiyoung Kim [Tue, 3 Dec 2019 06:31:17 +0000 (15:31 +0900)]
Add jooyung to owners

Add jooyung@ to OWNERS list.

Test: no test required
Change-Id: I9bd783cadf7c324f728c1264cb082562db0a7678

4 years agoMerge "Add ART module members to linkerconfig owners."
Nicolas Geoffray [Mon, 2 Dec 2019 08:34:05 +0000 (00:34 -0800)]
Merge "Add ART module members to linkerconfig owners."
am: 0c04afcb05

Change-Id: Icee5851c6ddb7c28ae7fba553ae68ec2920cbbd8

4 years agoMerge "Add ART module members to linkerconfig owners."
Nicolas Geoffray [Mon, 2 Dec 2019 08:31:08 +0000 (08:31 +0000)]
Merge "Add ART module members to linkerconfig owners."

4 years agoAdd ART module members to linkerconfig owners.
Nicolas Geoffray [Fri, 29 Nov 2019 09:44:40 +0000 (09:44 +0000)]
Add ART module members to linkerconfig owners.

Test: build/make/tools/checkowners.py -c system/linkerconfig/OWNERS
Change-Id: Icd285aa36ffb560df2700ed09223ca9f082e7ee5

4 years agoAdd /system/lib to the permitted paths for ns of APEXes
Jiyong Park [Mon, 2 Dec 2019 08:15:01 +0000 (00:15 -0800)]
Add /system/lib to the permitted paths for ns of APEXes
am: 406aa34b07

Change-Id: I64fa27f23235959873494bd8fa5adb3a6a83f6cd

4 years agoAdd /system/lib to the permitted paths for ns of APEXes
Jiyong Park [Fri, 22 Nov 2019 13:11:58 +0000 (22:11 +0900)]
Add /system/lib to the permitted paths for ns of APEXes

With b/144533348, there will be symlinks from libs in APEXes to the libs
in the system partition. This is to reduce the size of APEXes when the
APEX is bundled with the platform.

Adding the /system/lib to the permitted paths so that the realpaths of
the symlinks are allowed for the namespaces.

Note that this however does not open all libs in the system partition to
the APEX namespaces, because searching of the libs are NOT done in
/system/lib, but in /apex/<module>/lib directory.

Bug: 144533348
Test: m
Change-Id: Ieb5dd795f6575123db4575f2a078cf136295b832

4 years agoAdd constraints resolution for dependencies
Jooyung Han [Fri, 29 Nov 2019 13:27:16 +0000 (05:27 -0800)]
Add constraints resolution for dependencies
am: b9f20d1929

Change-Id: I7444d7025e31e849b59bd1d48f7919bfa80fb7b2

4 years agoAdd constraints resolution for dependencies
Jooyung Han [Wed, 27 Nov 2019 13:08:46 +0000 (22:08 +0900)]
Add constraints resolution for dependencies

Each namespace may provide some list of libraries to other namespaces
and require some from others. From this constraints, generate mapping
between linker namespaces.

Bug: 144659031
Test: atest --host linkerconfig_modules_unittest
Change-Id: Ib3a948d4c5654557ad03adf8bade98cf527adc0f

4 years agoMerge "Make sure that namespace links are ordered"
Jooyung Han [Tue, 19 Nov 2019 08:45:53 +0000 (00:45 -0800)]
Merge "Make sure that namespace links are ordered"
am: 964d6bddf1

Change-Id: I2e9791e854653ffd0d75d0572be1532538f6bf54

4 years agoMerge "Make sure that namespace links are ordered"
Treehugger Robot [Tue, 19 Nov 2019 08:36:01 +0000 (08:36 +0000)]
Merge "Make sure that namespace links are ordered"

4 years agoMerge "Add runtime to unrestricted."
Christopher Ferris [Sat, 16 Nov 2019 16:36:51 +0000 (08:36 -0800)]
Merge "Add runtime to unrestricted."
am: 637bd4d9bd

Change-Id: I9b9d9b15295b94689a39417d1204c4f50e6a4bc7

4 years agoMerge "Add runtime to unrestricted."
Christopher Ferris [Sat, 16 Nov 2019 16:32:53 +0000 (16:32 +0000)]
Merge "Add runtime to unrestricted."

4 years agoMake sure that namespace links are ordered
Jooyung Han [Fri, 15 Nov 2019 04:48:00 +0000 (13:48 +0900)]
Make sure that namespace links are ordered

Unit test added.

Bug: 144464148
Test: atest --host linkerconfig_modules_unittest
Change-Id: Id23f325b9354d4bf45c4d357e3cda6dbe82ee6d0

4 years agoUse ordered sequences for namespace links
Jooyung Han [Fri, 15 Nov 2019 02:19:20 +0000 (18:19 -0800)]
Use ordered sequences for namespace links
am: b461a7bffd

Change-Id: Id6a72654b0844c92fb1df08946a9791ca9934fbd

4 years agoUse ordered sequences for namespace links
Jooyung Han [Thu, 14 Nov 2019 08:14:17 +0000 (17:14 +0900)]
Use ordered sequences for namespace links

The order of namespace links matters since linker searches in order.

Bug: 144464148
Test: atest --host linkerconfig_contents_fulltest
Test: see manually generated ld.config.txt (sphal ns)
Change-Id: Ice3db7060bb7b1b2ebeba9d3a3fcfa22b623ccc6

4 years agoMerge "vndk-ext should come before vndk(VNDK APEX)"
Jooyung Han [Thu, 14 Nov 2019 06:07:31 +0000 (22:07 -0800)]
Merge "vndk-ext should come before vndk(VNDK APEX)"
am: 1314c36936

Change-Id: Iaf16abaf2c5f4ac25c384f6d68b4e2262707c1b5

4 years agoMerge "vndk-ext should come before vndk(VNDK APEX)"
Treehugger Robot [Thu, 14 Nov 2019 05:56:19 +0000 (05:56 +0000)]
Merge "vndk-ext should come before vndk(VNDK APEX)"

4 years agovndk-ext should come before vndk(VNDK APEX)
Jooyung Han [Thu, 14 Nov 2019 04:27:19 +0000 (13:27 +0900)]
vndk-ext should come before vndk(VNDK APEX)

vndk-ext (/vendor/{LIB}/vndk) should come before vndk
(/apex/com.android.vndk.v{VER}/{LIB}) so that vndk-ext eclipse vndk.

Test: atest --host linkerconfig_contents_fulltest
Test: add vndkext lib to /vendor/{LIB}/vndk and check if it is loaded
correctly.

Change-Id: I554e2d0fdf5429e7e2bb3b3b955d852351d54a9f

4 years agoAdd runtime to unrestricted.
Christopher Ferris [Thu, 14 Nov 2019 01:12:03 +0000 (17:12 -0800)]
Add runtime to unrestricted.

Without this change, malloc debug and malloc hooks will not work
when executed from /data/local/tmp. This would represent a regression
from Q, and it also mean that atest could not run the system tests.

Also add the malloc debug and malloc hooks tests to this directory.

Test: malloc debug and malloc hooks system tests pass.
Change-Id: I5ecaa2710aef97d6b9468aa005bdf0a74f72014a

4 years agoRetain relevant comments from system/core/rootdir/etc/ld.config.txt.
Martin Stjernholm [Thu, 14 Nov 2019 00:58:03 +0000 (16:58 -0800)]
Retain relevant comments from system/core/rootdir/etc/ld.config.txt.
am: 7e36aeaa61

Change-Id: I12a163401f179ff3a393071a1f3b07b85e109f39

4 years agoRetain relevant comments from system/core/rootdir/etc/ld.config.txt.
Martin Stjernholm [Mon, 11 Nov 2019 15:51:25 +0000 (15:51 +0000)]
Retain relevant comments from system/core/rootdir/etc/ld.config.txt.

This CL carries over the comments from the old text config that was deleted
in https://r.android.com/1128832.

Test: N/A - comment changes only
Bug: 138920271
Change-Id: I4309599228cace3d19bba7bc992e80fe2eb66c69

4 years agoAdd runtime namespace
Jiyong Park [Mon, 11 Nov 2019 04:52:40 +0000 (20:52 -0800)]
Add runtime namespace
am: 72410b5474

Change-Id: I984c724a9e153a2fe950a833b660589a61354a1f

4 years agoAdd runtime namespace
Jiyong Park [Tue, 5 Nov 2019 06:54:05 +0000 (15:54 +0900)]
Add runtime namespace

libc_malloc_hooks/debug.so are included in the runtime APEX, which now
is only for the bionic libs. The libs should be loaded in isolatation
from other libs because they might not be compatible with other libs in
/system/lib. (the libs depend on libc++.so)

Creating the namespace 'runtime' where the libs can be loaded into.

No modification to the bionic side is needed because it already has been
trying to load the libs from the namespace. The namespace actually was
accidentaly disappeared during the split of the runtime APEX into
runtime and art APEXes.

Bug: 143892776
Test: bionic-unit-tests
Change-Id: I638c5f0439eb402338b90f2c01fddbfdae7d73e9

4 years agoMerge "Revert "Revert "Check ro.treble.enabled for legacy devices"""
Daichi Hirono [Thu, 31 Oct 2019 03:38:30 +0000 (20:38 -0700)]
Merge "Revert "Revert "Check ro.treble.enabled for legacy devices"""
am: 8aa4ecefb5

Change-Id: Ifadf272d28482c3be696b72b299e837e564e6bbd

4 years agoMerge "Revert "Revert "Check ro.treble.enabled for legacy devices"""
Treehugger Robot [Thu, 31 Oct 2019 03:12:39 +0000 (03:12 +0000)]
Merge "Revert "Revert "Check ro.treble.enabled for legacy devices"""

4 years agoRevert "Revert "Check ro.treble.enabled for legacy devices""
Daichi Hirono [Thu, 31 Oct 2019 01:49:23 +0000 (01:49 +0000)]
Revert "Revert "Check ro.treble.enabled for legacy devices""

This reverts commit ab0f8cb501f2e42b1904dd0f79ca0f8b5a3cc5d6.

Reason for revert: Reland the fix after fixing internal device config.

Change-Id: Ib23c1136f5ad4bcc3e1f6aa8f2c0b9ad7d5fb259

4 years agoDO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Xin Li [Wed, 30 Oct 2019 18:50:44 +0000 (11:50 -0700)]
DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master

Bug: 142003500
Change-Id: Iecbfb34019dfbaa82e7c7947c849deb67ceb4da4

4 years agoMerge "Revert "Check ro.treble.enabled for legacy devices""
Daichi Hirono [Wed, 30 Oct 2019 07:02:54 +0000 (00:02 -0700)]
Merge "Revert "Check ro.treble.enabled for legacy devices""
am: a9dc08c8cd

Change-Id: I7812fde519f6da46699a966d0b1e0f0c418956f4

4 years agoMerge "Revert "Check ro.treble.enabled for legacy devices""
Treehugger Robot [Wed, 30 Oct 2019 06:53:37 +0000 (06:53 +0000)]
Merge "Revert "Check ro.treble.enabled for legacy devices""

4 years agoRevert "Check ro.treble.enabled for legacy devices"
Daichi Hirono [Wed, 30 Oct 2019 04:56:35 +0000 (04:56 +0000)]
Revert "Check ro.treble.enabled for legacy devices"

This reverts commit 7343a1dc1513036c3122874076db43878037c18f.

Reason for revert: Broke some device boot

Change-Id: I3ebc423a88155652d4aa78f6fbf13faef0c911cb

4 years agoMerge "Revert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk...
Jooyung Han [Wed, 30 Oct 2019 04:37:50 +0000 (21:37 -0700)]
Merge "Revert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""""
am: 097dd3b20c

Change-Id: If235bb31a909e72673493d7bd192b3ec03b46818

4 years agoMerge "Revert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk...
Treehugger Robot [Wed, 30 Oct 2019 04:29:37 +0000 (04:29 +0000)]
Merge "Revert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""""

4 years agoMerge "Check ro.treble.enabled for legacy devices"
Daichi Hirono [Tue, 29 Oct 2019 23:55:04 +0000 (16:55 -0700)]
Merge "Check ro.treble.enabled for legacy devices"
am: 990dfcffdc

Change-Id: Ib76cac35c2f438f5a30d31f18e3c1aa4a094b326

4 years agoMerge "Check ro.treble.enabled for legacy devices"
Treehugger Robot [Tue, 29 Oct 2019 23:42:23 +0000 (23:42 +0000)]
Merge "Check ro.treble.enabled for legacy devices"

4 years agoCheck ro.treble.enabled for legacy devices
Daichi Hirono [Tue, 29 Oct 2019 08:33:01 +0000 (17:33 +0900)]
Check ro.treble.enabled for legacy devices

If ro.treble.enabled is "false", the device should use legacy config.

Bug: 143495511
Test: None
Change-Id: I913df5b9feedffa6474527a3ca17d4852e631cb5

4 years agoRevert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""
Jooyung Han [Mon, 28 Oct 2019 21:08:26 +0000 (21:08 +0000)]
Revert "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""

This reverts commit 97599dbfeeaaae6d21fe4614753ac6198e3f4e2e.

Reason for revert: Fix b/143374795

Change-Id: I156a51435af052a3aae405c74f2a37717bdead5f

4 years agoMerge "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""
Greg Kaiser [Mon, 28 Oct 2019 17:20:09 +0000 (10:20 -0700)]
Merge "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""
am: 54de6a01ed

Change-Id: I75ef6ecc7564c457dcff265694c552a6766c2ff0

4 years agoMerge "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""
Greg Kaiser [Mon, 28 Oct 2019 17:12:33 +0000 (17:12 +0000)]
Merge "Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""""

4 years agoRevert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""
Jooyung Han [Mon, 28 Oct 2019 05:08:19 +0000 (05:08 +0000)]
Revert "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""

This reverts commit 908c05068cde21bc80fa065a4268bc24c93f7104.

Reason for revert: b/143374795

Change-Id: I7fc765717e0a8c367829ae2781209d4a92b69d71

4 years agoMerge "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""
Jooyung Han [Fri, 25 Oct 2019 08:31:19 +0000 (01:31 -0700)]
Merge "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""
am: 4125e37c3b

Change-Id: Icd8e9f3b7d7fc0b6e40ea081e959ae9a8067eb78

4 years agoMerge "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""
Jooyung Han [Fri, 25 Oct 2019 08:21:13 +0000 (08:21 +0000)]
Merge "Revert "Revert "Use VNDK APEX instead of /system/lib/vndk"""

4 years agoRevert "Revert "Use VNDK APEX instead of /system/lib/vndk""
Jooyung Han [Fri, 18 Oct 2019 06:58:55 +0000 (15:58 +0900)]
Revert "Revert "Use VNDK APEX instead of /system/lib/vndk""

This reverts commit a98213baf744c0389c4a1bbe85a8f89720f34420.

Bug: 141451661
Test: m && boot (tested with cuttlefish)
Test: atest CtsNNAPITestCases (this failed with original topic)
Change-Id: I8d7f3c0b35430a0e8fc7857deb9536012c5995af

4 years agoMerge "Revert "Use VNDK APEX instead of /system/lib/vndk""
Jooyung Han [Thu, 17 Oct 2019 12:08:30 +0000 (05:08 -0700)]
Merge "Revert "Use VNDK APEX instead of /system/lib/vndk""
am: 1324ac1552

Change-Id: I2deacb5c3469e2c1ba65598c6e8682b7768e6248

4 years agoMerge "Revert "Use VNDK APEX instead of /system/lib/vndk""
Treehugger Robot [Thu, 17 Oct 2019 11:50:47 +0000 (11:50 +0000)]
Merge "Revert "Use VNDK APEX instead of /system/lib/vndk""

4 years agoMerge "Do not expose namespace vector"
Kiyoung Kim [Thu, 17 Oct 2019 11:18:32 +0000 (04:18 -0700)]
Merge "Do not expose namespace vector"
am: 2c9326fd9b

Change-Id: I8df56552dbfdcd7f93d764c9cacc49c2ca6fe12f

4 years agoMerge "Do not expose namespace vector"
Treehugger Robot [Thu, 17 Oct 2019 11:13:03 +0000 (11:13 +0000)]
Merge "Do not expose namespace vector"

4 years agoMerge "Support legacy and vndklite mode"
Kiyoung Kim [Thu, 17 Oct 2019 08:14:51 +0000 (01:14 -0700)]
Merge "Support legacy and vndklite mode"
am: 5cdad7a708

Change-Id: I2405cd71c559953f735b16de39b48699ef8c5066

4 years agoMerge "Support legacy and vndklite mode"
Kiyoung Kim [Thu, 17 Oct 2019 06:54:04 +0000 (06:54 +0000)]
Merge "Support legacy and vndklite mode"

4 years agoSupport legacy and vndklite mode
Kiyoung Kim [Mon, 30 Sep 2019 07:58:39 +0000 (16:58 +0900)]
Support legacy and vndklite mode

Support legacy and vndklite linker configuration. This program will
generate these configurations based on the property - ro.vndk.version
and ro.vndk.lite

Bug: 139638519
Bug: 139639353
Test: m -j && atest passed
Test: Generated from cuttlefish and compared from original content
Change-Id: I4461a4bd8befce0ffdc6b1a7f644650902320eb5

4 years agoDo not expose namespace vector
Kiyoung Kim [Tue, 15 Oct 2019 10:42:37 +0000 (19:42 +0900)]
Do not expose namespace vector

To avoid abnormal usage with namespace vector, create ForAllNamespaces
function instead of get function returns namespace vector

Test: m -j && atest passed
Test: tested from cuttlefish
Change-Id: Ic5efbb0575d8f8c71746edd142a361c931157654

4 years agoRevert "Use VNDK APEX instead of /system/lib/vndk"
Jooyung Han [Wed, 16 Oct 2019 22:34:27 +0000 (22:34 +0000)]
Revert "Use VNDK APEX instead of /system/lib/vndk"

This reverts commit f5f85e3619c5b24165a455d99a3285dac63c3025.

Reason for revert: some targets are broken

Bug: 142773030
Change-Id: I0302ba35f354de6feb2a42b70acb65e70ba0c224

4 years agoUse VNDK APEX instead of /system/lib/vndk
Jooyung Han [Tue, 15 Oct 2019 09:44:14 +0000 (02:44 -0700)]
Use VNDK APEX instead of /system/lib/vndk
am: f5f85e3619

Change-Id: Ie099c9b6f969a2c22489c6e05037991ba3c9f57e

4 years agoUse VNDK APEX instead of /system/lib/vndk
Jooyung Han [Thu, 26 Sep 2019 14:29:39 +0000 (23:29 +0900)]
Use VNDK APEX instead of /system/lib/vndk

With VNDK APEX, the path to VNDK libs is changed from
/system/lib/vndk-VER to /apex/com.android.vndk.vVER/lib

Bug: 141451661
Test: m && boot (tested with cuttlefish)
Change-Id: Id92532767d8c3aa20c3aff72a9ee0602aa0be8d3

4 years agoEnsure all namespaces have links to /system/lib(64) for the sanitizer libs.
Martin Stjernholm [Tue, 8 Oct 2019 11:13:52 +0000 (04:13 -0700)]
Ensure all namespaces have links to /system/lib(64) for the sanitizer libs.
am: cb9df4f63e

Change-Id: Ifdf4ac4ff399ca3b13dfdfc12371eab78b8cb888

4 years agoMake link creation additive.
Martin Stjernholm [Tue, 8 Oct 2019 11:13:49 +0000 (04:13 -0700)]
Make link creation additive.
am: 7f8f6a08fa

Change-Id: I841d1de0755ee42a611bc4a9bceb4abc2abf4ab1

4 years agoRename the runtime linker namespace following ART/Runtime APEX split.
Martin Stjernholm [Tue, 8 Oct 2019 03:57:21 +0000 (20:57 -0700)]
Rename the runtime linker namespace following ART/Runtime APEX split.
am: f02d5d69a6

Change-Id: I5354597fad998b022e5aff513c5a9392a36cb975

4 years agoEnsure all namespaces have links to /system/lib(64) for the sanitizer libs.
Martin Stjernholm [Wed, 2 Oct 2019 19:47:12 +0000 (20:47 +0100)]
Ensure all namespaces have links to /system/lib(64) for the sanitizer libs.

Every namespace that have links to Bionic should also link to
SANITIZER_RUNTIME_LIBRARIES, without exception. Hence a common function
ctx.AddStandardSystemLinks is added to handle it.

Also remove links to the runtime namespace, since all sanitizer libs,
including the hwasan one, now should be loaded from /system/lib(64).

Test: atest system/linkerconfig/
Test: m linkerconfig && \
  out/host/linux-x86/bin/linkerconfig --root out/target/product/taimen --vndk R
  before and after change, check that the diffs are expected:
  http://gpaste/4942871205511168
Bug: 140790209
Change-Id: Ib5315b59c22703da295a5ef6d556c0a945f872af

4 years agoMake link creation additive.
Martin Stjernholm [Sat, 5 Oct 2019 17:15:35 +0000 (18:15 +0100)]
Make link creation additive.

Replace CreateLink with GetLink, which returns the existing link if any, or
else creates it. Also set allow_all_shared_libs separately, which will
override any list of explicitly set libs. This makes link creation additive:
different functions may add links, or set allow_all_shared_libs, without
knowledge of each other.

Test: m linkerconfig && \
  out/host/linux-x86/bin/linkerconfig --root out/target/product/taimen --vndk R
  before and after the change, and check that there are no diffs.
Test: atest system/linkerconfig/
Bug: 140790209

Change-Id: Ida8acf0b003797df4945359c43de7e8819c4166e

4 years agoRename the runtime linker namespace following ART/Runtime APEX split.
Martin Stjernholm [Wed, 2 Oct 2019 14:28:11 +0000 (15:28 +0100)]
Rename the runtime linker namespace following ART/Runtime APEX split.

Also carry over the applicable TODOs and other comments from ld.config.txt
for the art namespace.

Test: Build & boot
Bug: 139408016
Change-Id: Ib33d544ab6a2871c4b6ff64fb10e7925ede5ace6

4 years agoAdd a link from runtime ns to the neuralnetworks ns
Jiyong Park [Thu, 3 Oct 2019 11:47:41 +0000 (04:47 -0700)]
Add a link from runtime ns to the neuralnetworks ns
am: 03ab249d1b

Change-Id: I1448bd36793f5c35c836d86ad0cef90205b115ba

4 years agoAdd a link from runtime ns to the neuralnetworks ns
Jiyong Park [Wed, 2 Oct 2019 07:01:35 +0000 (16:01 +0900)]
Add a link from runtime ns to the neuralnetworks ns

libneuralnetworks.so could be preloaded. In that case, it should be
accessible from libnativeloader which runs in the runtime namespace.

Bug: 141847343
Test: m, device boots
Change-Id: Ie1e17a433fb64cc31d1bbc7fa8945fa36c82aea8

4 years agoTrim whitespace while loading library list file am: f74c2b7afb am: bfe922cff5
Kiyoung Kim [Tue, 1 Oct 2019 11:31:31 +0000 (04:31 -0700)]
Trim whitespace while loading library list file am: f74c2b7afb am: bfe922cff5
am: cdf5509659

Change-Id: If5b8edeec53cf02d360ded50066ae6b187c83dcd

4 years agoTrim whitespace while loading library list file am: f74c2b7afb
Kiyoung Kim [Tue, 1 Oct 2019 11:23:59 +0000 (04:23 -0700)]
Trim whitespace while loading library list file am: f74c2b7afb
am: bfe922cff5

Change-Id: I4013047d5213267510067b7cdc37865429839b52

4 years agoTrim whitespace while loading library list file
Kiyoung Kim [Tue, 1 Oct 2019 11:14:55 +0000 (04:14 -0700)]
Trim whitespace while loading library list file
am: f74c2b7afb

Change-Id: I82c94fc5a3899dfaae2b1d8800863742d46ba337

4 years agoTrim whitespace while loading library list file
Kiyoung Kim [Fri, 27 Sep 2019 08:45:10 +0000 (17:45 +0900)]
Trim whitespace while loading library list file

Trim leading and trailing whitespaces from library list file to get
exact library file name

Bug: 141695559
Test: m -j && atest passed
Change-Id: I26078597323229f01e3d88f05188a7a717f3cf2c

4 years agoLoad VNDK using core variant library list am: 18eb4c6465 am: 50e4b94b77
Kiyoung Kim [Mon, 30 Sep 2019 02:24:17 +0000 (19:24 -0700)]
Load VNDK using core variant library list am: 18eb4c6465 am: 50e4b94b77
am: 6856c3e758

Change-Id: I9fbc7525ea72cef07242175598942a9994e00d73

4 years agoLoad VNDK using core variant library list am: 18eb4c6465
Kiyoung Kim [Mon, 30 Sep 2019 02:17:41 +0000 (19:17 -0700)]
Load VNDK using core variant library list am: 18eb4c6465
am: 50e4b94b77

Change-Id: I415499ce5fe7ffe710d9303ec8d1d54f534030a0

4 years agoLoad VNDK using core variant library list
Kiyoung Kim [Mon, 30 Sep 2019 01:59:16 +0000 (18:59 -0700)]
Load VNDK using core variant library list
am: 18eb4c6465

Change-Id: Ib4ec2ccc907865e0d1cfcf94d6523a41770e739f

4 years agoLoad VNDK using core variant library list
Kiyoung Kim [Fri, 27 Sep 2019 05:06:54 +0000 (14:06 +0900)]
Load VNDK using core variant library list

VNDK_USING_CORE_VARIANT is not implemented previously as it is only
handled from specific devices. To handle this properly new logic is
added to load library list from library list file in system image.

Bug: 141695559
Test: m -j passed & Tested from Cuttlefish
Change-Id: Idfbcda5ff99bfb1dc13c35da06b977b5b5ea0494

4 years agoMake linkerconfig support host am: a3d5d09fda am: 0bfd139c94
Jooyung Han [Fri, 27 Sep 2019 02:32:53 +0000 (19:32 -0700)]
Make linkerconfig support host am: a3d5d09fda am: 0bfd139c94
am: fc18ec24f3

Change-Id: I27c4ebf71ee5484784ee6e64b3a9c0e5c2d574a5

4 years agoMake linkerconfig support host am: a3d5d09fda
Jooyung Han [Fri, 27 Sep 2019 02:25:35 +0000 (19:25 -0700)]
Make linkerconfig support host am: a3d5d09fda
am: 0bfd139c94

Change-Id: I22127c801d4391640fc7117969fbdee578a5eaef

4 years agoMake linkerconfig support host
Jooyung Han [Fri, 27 Sep 2019 02:19:17 +0000 (19:19 -0700)]
Make linkerconfig support host
am: a3d5d09fda

Change-Id: I4652947c62c20d8263bef4f94f995cafe055c7ba

4 years agoMake linkerconfig support host
Jooyung Han [Thu, 26 Sep 2019 14:23:50 +0000 (23:23 +0900)]
Make linkerconfig support host

By supplying two additional args for host running
--root <root dir>
--vndk <vndk version>
one can run linkerconfig and see the resulting ld.config.txt

Some input files are found under <root>/system/etc with <vndk version>.
For example, out/target/vsoc_x86/system/etc/llndk.libraries.29.txt

Bug: 141660636
Test: m linkerconfig
Test: linkerconfig --root $OUT --vndk 29
Change-Id: I4aeab731a17764d7aa7e508842eae620f55f781e

4 years agoAdd libneuralnetworks_packageinfo.so in neuralnetworks link am: d1861bc9f4 am: c35045632f
Kiyoung Kim [Thu, 26 Sep 2019 04:30:17 +0000 (21:30 -0700)]
Add libneuralnetworks_packageinfo.so in neuralnetworks link am: d1861bc9f4 am: c35045632f
am: 96d3e3c7cd

Change-Id: I983da9124a87dbb4455d18f6435bc0fd3f021b16

4 years agoMaintain directory to section map in manual am: 360a6f3367 am: faa32ee3f1
Kiyoung Kim [Thu, 26 Sep 2019 04:30:12 +0000 (21:30 -0700)]
Maintain directory to section map in manual am: 360a6f3367 am: faa32ee3f1
am: 1b19641307

Change-Id: I2cf1c30612549262ef92c484dbddb5a7440adb6b

4 years agoAdd libneuralnetworks_packageinfo.so in neuralnetworks link am: d1861bc9f4
Kiyoung Kim [Thu, 26 Sep 2019 04:22:22 +0000 (21:22 -0700)]
Add libneuralnetworks_packageinfo.so in neuralnetworks link am: d1861bc9f4
am: c35045632f

Change-Id: Ibbcb95977398915bc440eeea1de51076911e96e7

4 years agoMaintain directory to section map in manual am: 360a6f3367
Kiyoung Kim [Thu, 26 Sep 2019 04:22:18 +0000 (21:22 -0700)]
Maintain directory to section map in manual am: 360a6f3367
am: faa32ee3f1

Change-Id: I51fca94dc96d097a9a5449a382904e858b110e59

4 years agoAdd libneuralnetworks_packageinfo.so in neuralnetworks link
Kiyoung Kim [Thu, 26 Sep 2019 04:15:00 +0000 (21:15 -0700)]
Add libneuralnetworks_packageinfo.so in neuralnetworks link
am: d1861bc9f4

Change-Id: I9ecab0b021002970f29bd239fd2778024c59ac48

4 years agoMaintain directory to section map in manual
Kiyoung Kim [Thu, 26 Sep 2019 04:14:56 +0000 (21:14 -0700)]
Maintain directory to section map in manual
am: 360a6f3367

Change-Id: Ic299e37e28168c5c57f2d19539ab2bc07fd918f9

4 years agoAdd libneuralnetworks_packageinfo.so in neuralnetworks link
Kiyoung Kim [Wed, 25 Sep 2019 04:08:20 +0000 (13:08 +0900)]
Add libneuralnetworks_packageinfo.so in neuralnetworks link

Link to libneuralnetworks_packageinfo.so is added in ld.config.txt but
missed from linker config generator.
Adding this to fix linking issue from neuralnetworks.

Bug: 139282353
Test: m -j && atest passed
Change-Id: I1fa58f645a348e6a8760b3e51fd5837ff1a3161f

4 years agoMaintain directory to section map in manual
Kiyoung Kim [Tue, 24 Sep 2019 06:35:54 +0000 (15:35 +0900)]
Maintain directory to section map in manual

Order of directory to section map was maintained automatically in
reverse dictionary order. However, this made a problem that /vendor/bin
comes first which caused sepolicy errors from system binaries. To
resolve this kinds of issues, order of map should be maintained in
manual.

Bug: 141524071
Test: m -j && atest passed
Test: Tested from Cuttlefish
Change-Id: Ibb4364e15eee63ac0af30c20e808847f2cdcf1e8

4 years agoMerge "Create full test for ld.config.txt content" am: 9112ee5e03 am: 3a768552a1
Kiyoung Kim [Wed, 11 Sep 2019 04:08:15 +0000 (21:08 -0700)]
Merge "Create full test for ld.config.txt content" am: 9112ee5e03 am: 3a768552a1
am: 29da463c0e

Change-Id: I991d05ddab1be24bf419059d7de36081cd0f4ca7

4 years agoMerge "Create full test for ld.config.txt content" am: 9112ee5e03
Kiyoung Kim [Wed, 11 Sep 2019 03:58:01 +0000 (20:58 -0700)]
Merge "Create full test for ld.config.txt content" am: 9112ee5e03
am: 3a768552a1

Change-Id: I5d8f70f81eaa052f00cfd3879ffeb923a408ccc0