OSDN Git Service

android-x86/system-linkerconfig.git
4 years agoRemove unused files
Jooyung Han [Fri, 7 Feb 2020 17:51:00 +0000 (02:51 +0900)]
Remove unused files

conscrypt and neuralnetworks namespaces are now generated automatically.

Bug: N/A
Test: build
Change-Id: Ic13d3f4206ecfda1937adf2111977b279fba05ef

4 years agoAuto-generate runtime namespace
Jooyung Han [Thu, 6 Feb 2020 11:46:02 +0000 (20:46 +0900)]
Auto-generate runtime namespace

runtime apex provides bionic(libc/libm/libdl) libraries. But actually
they are supposed to be accessed via symlinks in /system/lib (i.e.
system namespace).

By amending soong not to emit those bionic libs as providing libs of
runtime apex, now runtime apex can be auto-generated by linkerconfig.

Bug: 144664390
Test: build / flash / boot
Change-Id: Idda42801a608e5fcb495bfccdd07ca6c0666a53d

4 years agoAuto-generate media namespace
Jooyung Han [Thu, 6 Feb 2020 11:39:02 +0000 (20:39 +0900)]
Auto-generate media namespace

Now, media namespace is auto-generated.
This is done by adding /apex/<name>/lib as permitted path as well as
search path, because media apex needs a permitted path
/com.android.media/lib/extractors.

Bug: 144664390
Test: build / flash / boot
      atest --test-mapping system/linkerconfig
Change-Id: I9186b0768b3bce3ad19f3d14010725af0bbf5861

4 years agoAuto-generate apex namespaces: cronet,nn,conscrypt
Jooyung Han [Thu, 6 Feb 2020 11:17:53 +0000 (20:17 +0900)]
Auto-generate apex namespaces: cronet,nn,conscrypt

Some visible namespaces are now auto-generated using activated apex
info. This is quite a significant change for init/bootstrap stages.
For example, at init stage which has no apexes activated, linkerconfig
dosn't generate apex namespaces at all. Previously, it was statically
generated whether those apexes are available or not.

Amon remaining apexes, media and runtime will be removed soon.

Bug: 144664390
Test: compare generated ld.config.txt between changes
      build / flash / boot
      atest --test-mapping system/linkerconfig
Change-Id: I334071dd59273e194ccdca1ef2cff0b7ee1b5c35

4 years agoMerge "Configuration for special APEX binaries"
Kiyoung Kim [Fri, 7 Feb 2020 03:25:42 +0000 (03:25 +0000)]
Merge "Configuration for special APEX binaries"

4 years agoConfiguration for special APEX binaries
Kiyoung Kim [Wed, 29 Jan 2020 05:56:54 +0000 (14:56 +0900)]
Configuration for special APEX binaries

Some of the linker configuration for APEX binaries are not enough just
to use auto-generated contents. This change implements some of the
additional namespaces for some special APEXes with binaries - ART and
Media SWCodec.

Bug: 147987608
Test: m -j passed
Test: Tested adbd and swcodec(Youtube) on Cuttlefish and Crosshatch
Change-Id: I58345dc31bb97138c9c632039a10ab000e23bcb6

4 years agoConvert system/linkerconfig to Result::ok()
Bernie Innocenti [Thu, 6 Feb 2020 14:16:23 +0000 (23:16 +0900)]
Convert system/linkerconfig to Result::ok()

No functionality changes, this is a mechanical cleanup.

Test: m
Change-Id: I759398fdf01d1703b0c128fb4f34d33a6f1a2027

4 years agoMove part of Context into modules::BaseContext
Jooyung Han [Tue, 4 Feb 2020 10:46:06 +0000 (19:46 +0900)]
Move part of Context into modules::BaseContext

ApexInfo/strict is used in Section::Resolve and it's very generic.
Moving it into BaseContext makes code simpler

Bug: N/A
Test: atest --test-mapping system/linkerconfig
Change-Id: I8acbdb7ed3368b6c10474be1c30a12fbc81c8ca6

4 years agoAdd default "provides" list to system namespace
Jooyung Han [Mon, 3 Feb 2020 10:32:33 +0000 (19:32 +0900)]
Add default "provides" list to system namespace

Contrary to APEX modules, system doesn't have meta data represening
"provides". So adding the "provides" list to system namespaces.

Bug: 144664390
Test: build / flash / boot
Test: atest --test-mapping system/linkerconfig
Change-Id: I808736814221a0d0cff2f163d64da01b398dc265

4 years agoAdd "--strict" flag
Jooyung Han [Mon, 3 Feb 2020 09:07:12 +0000 (18:07 +0900)]
Add "--strict" flag

--strict flag tells linkerconfig to resolve constraints in strict mode.
In strict mode, when a required module is not found, resolution fails.
Otherwise, missing requirements are ignored silently.

Linkerconfig may run at a very early stage when there is no apexes or
only bootstrap apexes are activated. --strict mode can be turned on when
all apexes are activated.

Bug: 144664390
Test: build / flash / boot
Change-Id: I13cab3aabb605338d031f825fe4af5f9a410a715

4 years agoBuild adbd/resolv namespace automatically
Jooyung Han [Mon, 3 Feb 2020 08:35:56 +0000 (17:35 +0900)]
Build adbd/resolv namespace automatically

adbd/resolv APEXes can be generated automatically.

Bug: 144664390
Test: build / flash / boot
Change-Id: I025bf186d7071e6051bd65d94ec9b3185b8c1a43

4 years agoMerge "Pass Context to Build.*Configuration"
Treehugger Robot [Tue, 4 Feb 2020 05:42:40 +0000 (05:42 +0000)]
Merge "Pass Context to Build.*Configuration"

4 years agoMerge "Add libadbd_auth.so to stub library list."
Josh Gao [Mon, 3 Feb 2020 20:15:20 +0000 (20:15 +0000)]
Merge "Add libadbd_auth.so to stub library list."

4 years agoPass Context to Build.*Configuration
Jooyung Han [Mon, 3 Feb 2020 05:23:06 +0000 (14:23 +0900)]
Pass Context to Build.*Configuration

Context is prepared with activated APEX modules and passed to the
configuration builders.

This doesn't change the current behavior, and there will be follow-up
changes which uses Context to generate APEX-related configuration
dynamically.

Bug: 144664390
Test: compare geneated ld.config.txt files with old ones.
Change-Id: Ice4c7e57d8f5894e4b18510a116e5b38da8d8462

4 years agoMerge "Fix handling mkdir failure"
Treehugger Robot [Fri, 31 Jan 2020 07:22:27 +0000 (07:22 +0000)]
Merge "Fix handling mkdir failure"

4 years agoAdd libadbd_auth.so to stub library list.
Josh Gao [Fri, 31 Jan 2020 00:19:29 +0000 (16:19 -0800)]
Add libadbd_auth.so to stub library list.

Test: treehugger
Change-Id: I90cc7906e73f90234fcd13aad42e1affb69ff9dc

4 years agoUse provide/require to link namespaces
Jooyung Han [Wed, 29 Jan 2020 18:29:10 +0000 (03:29 +0900)]
Use provide/require to link namespaces

Add provide/require information for adbd/art/conscrypt/neuralnetworks
namespace and use it to link namespaces.

With this change, this information is hard-coded but will come from
apex_manifest.pb.

Bug: 144659031
Test: Cuttlefish boots
Change-Id: I617818744b6e015c81170b345f9dfa8ca9b993ec

4 years agoFix handling mkdir failure
Jooyung Han [Thu, 30 Jan 2020 03:57:34 +0000 (12:57 +0900)]
Fix handling mkdir failure

The commit(98a691144d433bd05ad0d26f4caab38e8a3d9c39) was simply wrong
because mkdir() returns -1 and set errno instead of returning it.

Bug: n/a
Test: run linkerconfig twice with same target_dir

Change-Id: Iea8a7357219153abd00f342a1d7794b787bf09dc

4 years agoMerge "Link to system namespace using stub libraries"
Kiyoung Kim [Tue, 28 Jan 2020 10:39:38 +0000 (10:39 +0000)]
Merge "Link to system namespace using stub libraries"

4 years agoSort namespaces in a section
Jooyung Han [Tue, 28 Jan 2020 07:30:11 +0000 (16:30 +0900)]
Sort namespaces in a section

The order of namespaces doesn't matter.
It would be easier to compare when they are sorted, especially when we
generate them with dynamic APEX information.

Bug: N/A
Test: atest --test-mapping system/linkerconfig
Change-Id: I5845247152895c2503c49f7eafd52fb5665b24ba

4 years agoSkip log when mkdir fails with EEXIST
Jooyung Han [Tue, 28 Jan 2020 07:22:47 +0000 (16:22 +0900)]
Skip log when mkdir fails with EEXIST

This is useful when running linkerconfig many times with the same
target_directory.

Bug: N/A
Test: run linkerconfig on host
Change-Id: I38b70a5078afdc0f79d26789c04ec2ed075be491

4 years agoDo UpdatePermission only on target.
Jooyung Han [Tue, 28 Jan 2020 06:44:14 +0000 (15:44 +0900)]
Do UpdatePermission only on target.

Otherwise, UpdatePermission fails when running on host.

Bug: N/A
Test: run linkerconfig on host
Change-Id: I37207beb2404daa052b8011075d2c5eaaefa63c2

4 years agoLink to system namespace using stub libraries
Kiyoung Kim [Mon, 13 Jan 2020 02:44:05 +0000 (11:44 +0900)]
Link to system namespace using stub libraries

As stub libraries list is generated, linkerconfig can use this to
generalize list of libraries linked to system namespace from other
(usually APEX) libraries.

Bug: 147210213
Test: m -j passed && Cuttlefish succeeded to boot
Change-Id: I350390a023c0d186da11844152b51b06ace60e8a

4 years agoMerge "Add adbd apex configuration."
Treehugger Robot [Fri, 24 Jan 2020 22:06:11 +0000 (22:06 +0000)]
Merge "Add adbd apex configuration."

4 years agoMerge "Add liblog to system libraries."
Treehugger Robot [Fri, 24 Jan 2020 07:34:10 +0000 (07:34 +0000)]
Merge "Add liblog to system libraries."

4 years agoAdd adbd apex configuration.
Josh Gao [Thu, 23 Jan 2020 02:04:26 +0000 (18:04 -0800)]
Add adbd apex configuration.

The JDWP socket abstraction is moving from a server shared library
in the ART apex loaded by adbd, to a client shared library in the
adbd apex.

Test: manually booted internal, attached jdb to a random app twice
Change-Id: Ic8c9c7470321c965d1d614d7c99179b772dfd8c8

4 years agoAdd liblog to system libraries.
Josh Gao [Thu, 23 Jan 2020 20:36:40 +0000 (12:36 -0800)]
Add liblog to system libraries.

Test: treehugger
Change-Id: I79954cfd6a3a32f0988a24a18954db8f8459fd04

4 years agoMerge "Generate linkerconfig for APEX binaries"
Kiyoung Kim [Wed, 22 Jan 2020 07:58:43 +0000 (07:58 +0000)]
Merge "Generate linkerconfig for APEX binaries"

4 years agoGenerate linkerconfig for APEX binaries
Kiyoung Kim [Mon, 20 Jan 2020 04:33:00 +0000 (13:33 +0900)]
Generate linkerconfig for APEX binaries

Generate linkerconfig for APEX binaries. Dependency can be resolved with
platform namespace which offers stub libraries, and other APEX modules
based on its providing library list.

Bug: 147987608
Test: m -j passed && checked linkerconfig generated per binary APEX
Change-Id: I27a872d5e82618dc0621ed9a86c176171d2f00ab

4 years agoRead product vndk libraries only when available
Kiyoung Kim [Mon, 20 Jan 2020 10:55:40 +0000 (19:55 +0900)]
Read product vndk libraries only when available

Current linkerconfig implementation tries to read vndk library list with
product vndk version even when the version is not specified. This change
will let linkerconfig load those files only when product vndk version is
available.

Test: m -j passed && Checked execution from cuttlefish
Change-Id: Ifb861d7c71a43ac77b27a6c29419b5f965d6097d

4 years agoMerge "Add product section for product interface enforcement"
Treehugger Robot [Wed, 8 Jan 2020 07:42:01 +0000 (07:42 +0000)]
Merge "Add product section for product interface enforcement"

4 years agoScan Active APEXes
Jooyung Han [Mon, 6 Jan 2020 09:09:30 +0000 (18:09 +0900)]
Scan Active APEXes

Added a helper function ScanActiveApexes() which returns active APEXes.

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

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