Commit graph

404 commits

Author SHA1 Message Date
Kiyoung Kim
32082a7e28 Use generated linker config only
Remove prebuilt ld.config.txt to use linker config from generator only,
including legacy and vndk_lite case.

Bug: 139638519
Test: m -j passed

Change-Id: I043d51daca8cde1977236f9fbda919176a18618d
2019-12-24 14:18:53 +09:00
Kiyoung Kim
986e453d9c Remove ld.config.recovery.txt build
Remove ld.config.recovery.txt build as this will be replaced to be
generated from linkerconfig during build time.

Bug: 146414198
Test: m -j passed
Test: Checked linker config generated under recovery's system/etc
Change-Id: I0d2aa121973c4c99e68f44f4e76e4eab74dc2f95
2019-12-19 16:37:43 +09:00
Treehugger Robot
af15eff03b Merge "Don't preload libneuralnetworks.so" 2019-10-15 12:35:47 +00:00
Jiyong Park
98b1c69253 Don't preload libneuralnetworks.so
The lib isn't used by most of the apps. Don't waste memory by preloading
it to all apps.

Bug: 142482121
Test: `lsof -p $(pidof zygote64) | grep libneuralnetwork` shows nothing
Change-Id: I4a6e3df838fa3b7a46271e548e9fdc87bea948ae
2019-10-11 10:31:12 +09:00
Daichi Hirono
e76c0d2816 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 art namespace.

Bug: 141847343
Bug: 142089311
Test: m, cheets2 boots
Change-Id: I8710b624dff131f5cb797d53915f6597e3017c34
2019-10-09 07:43:52 +00:00
Martin Stjernholm
39e65d5b05 Ensure all namespaces have links to /system/lib(64) for the sanitizer libs.
This CL updates ld.config.vndk_lite.txt, which still is not handled by
linkerconfig.

Test: presubmits
Bug: 140790209
Change-Id: Ia822f86aa0b853656555ade0bed191e07c07d09d
2019-10-07 12:14:57 +01:00
Martin Stjernholm
752a1e0408 Rename the runtime linker namespace following ART/Runtime APEX split.
Remove the kludge in libnativeloader to deal with the inconsistency wrt the
name of the APEX package.

Test: Build & boot
Test: atest system/core/libnativeloader (on cf_x86_phone)
Bug: 139408016
Change-Id: I6115b49237c78c2ea4aa943ca4fe0b296b5a2b62
2019-10-07 12:14:57 +01:00
Treehugger Robot
71f124dc54 Merge "Add a link from runtime ns to the neuralnetworks ns" 2019-10-07 03:36:14 +00:00
Jiyong Park
8ec6f59e62 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
Bug: 142111172
Test: m, marlin/sailfish boots
Change-Id: I5b2f3073d0711d6049b4e1e1bd0bcc403949fe14
2019-10-07 09:34:41 +09:00
Kiyoung Kim
f064a1dd8c Deprecate ld.config.txt for fully treblelized devices
From latest change fully treblelized devices started to use
ld.config.txt from generator instead of the one under /system/etc. As so
existing ld.config.txt is no longer required. This change removes all
ld.config.txt content and build script for it.

Bug: 138920271
Test: m -j passed
Test: Tested from Cuttlefish
Change-Id: I9e2d4b305442a4fccc4378a997ec92bfd6cddb84
2019-10-01 13:31:05 +09:00
Przemyslaw Szczepaniak
5cdf2ef310 Merge "Add libneuralnetworks_packageinfo to neuralnetworks apex dependencies." 2019-09-24 15:08:09 +00:00
Martin Stjernholm
59b54f42bb Revert "Include com.android.runtime in the "runtime" linker namespace."
No longer required for hwasan builds, since b/140790209 is fixed.

This reverts change-id I27069b20f7c7068b931340f548b284ce1676466c.

This also reverts the identified change for the memory regression in
b/140648539.

Test: Build & boot on taimen_hwasan-userdebug
Test: Build & boot on crosshatch_hwasan-userdebug
Bug: 140790209
Bug: 139408016
Bug: 140648539
Change-Id: Ib61c53571a4de0970a86ebc391a2ce780247943a
2019-09-19 19:11:47 +01:00
Przemyslaw Szczepaniak
6122bc0037 Add libneuralnetworks_packageinfo to neuralnetworks apex dependencies.
Test: build & flash crosshatch
Bug: 139282353
Change-Id: Ia67aa4f74b1b7fe4f730995c42feb935cb3cd6c8
2019-09-17 16:35:58 +01:00
Martin Stjernholm
9c72fb6f08 Merge changes from topic "art-without-bionic"
am: 0c100685dc

Change-Id: I814ac6be70ff8ec197b71d2b68578fba75ac3b4a
2019-09-02 03:46:05 -07:00
Martin Stjernholm
bb55e0776f Update paths and names for the new ART APEX.
am: df96e1f25c

Change-Id: I971a44846276c7e8432bf27fa9465c86f33a1cd2
2019-09-02 03:45:36 -07:00
Martin Stjernholm
df96e1f25c Update paths and names for the new ART APEX.
Test: Build & boot
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
Merged-In: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
2019-08-30 17:47:31 +01:00
Martin Stjernholm
391332d276 Include com.android.runtime in the "runtime" linker namespace.
This is a temporary fix to keep the Bionic-associated libraries accessible
in the runtime namespace, pending a proper namespace split.

Test: Build & boot with taimen_hwasan-userdebug
Bug: 139408016
Bug: 139916951
Exempt-From-Owner-Approval: Approved internally
Change-Id: I27069b20f7c7068b931340f548b284ce1676466c
Merged-In: I27069b20f7c7068b931340f548b284ce1676466c
2019-08-30 17:47:31 +01:00
Jooyung Han
57b4d65eff Merge "ld.config.txt: remove link from rs to vndk"
am: 059b8dacfd

Change-Id: I647b726e70d2c0710b45b15f1bad08ebe2524b19
2019-08-29 09:40:42 -07:00
Jooyung Han
52c5aafb21 ld.config.txt: remove link from rs to vndk
Linker namespace 'rs' has /system/lib/vndk-sp in its search paths.
So we don't need to link 'rs' namespace to 'vndk' namespace.

Bug: 139706981
Test: run RS-using apps from Play
Change-Id: I14c1d6c4e7624bbd6551731ea88de1b4c2e5edb6
2019-08-22 12:18:16 +00:00
Jiyong Park
70961c7b9d Merge "neuralnetworks namespace links to system namespace in [vendor] section"
am: 12b0eb363d

Change-Id: I4186ec14731331410edad536f1d5b3250ecf41a1
2019-08-15 00:41:38 -07:00
Jiyong Park
1d89a7e899 neuralnetworks namespace links to system namespace in [vendor] section
This change fixes a bug that neuralnetworks namespace is linked to the
default namespace in [vendor] section. Default namespace is for
/vendor/lib in [vendor] section. System libraries are available in the
'system' namespace.

Bug: 139113342
Test: N/A
Change-Id: I1b6751e5e33522f9829f3d9ad7371efdce01b0f0
2019-08-15 09:48:07 +09:00
Kiyoung Kim
48a396b390 Merge "Remove unused link from postinstall section"
am: a91d84b6c4

Change-Id: I8c3b4df50daccc79e08726a175a3752fdc98e2e9
2019-08-13 22:52:03 -07:00
Kiyoung Kim
d3a3097927 Remove unused link from postinstall section
Linker ignores link configuration if either namespace is not valid.
However there was a link configuration from postinstall section which
target link namespace does not exist. Also, there was no binary within
postinstall from hwasan build (checked with bonito), so there may be no
usage for this section now. Removing this line for better human
readability, and behavior of the linker would be same as before.

Test: m -j && tested from cuttlefish
Change-Id: I0c7b2949d055ba767e1429238e8764ee7798fe44
2019-08-12 03:56:42 +00:00
Przemyslaw Szczepaniak
d91345d64c Merge "ld.config for com.android.neuralnetworks APEX."
am: 2f40aa0f60

Change-Id: I64f4f2253d0bf0f789f80a17cecb62ed7a2eb997
2019-07-24 02:25:36 -07:00
Przemyslaw Szczepaniak
0bb871dc9f ld.config for com.android.neuralnetworks APEX.
Makes updated libneuralnetworks.so in /apex/com.android.neuralnetworks/{LIB}
loadable from all relevant namespaces.

Test: Verified that right library is being loaded using lsof and
Test: verbose debug logs from bionic/ld.
Bug: 137320025
Change-Id: I38140bb9915a3f85f10456e15ed0f492dbdba802
2019-07-22 11:28:42 +01:00
Justin Yun
e0b1eb8d65 Merge "Rename product_services to system_ext"
am: 6da50e319c

Change-Id: If9eaecca2382b3ace74ae721e80d51c79bb9b0fb
2019-07-11 00:15:28 -07:00
Justin Yun
7eaf9b58ec Rename product_services to system_ext
Update ld.config.txt and init.

Bug: 134359158
Test: make && check boot and ld.config.txt file
Change-Id: Ie1dce42e690414fb45b26759506ea7f64d06740d
2019-07-09 23:34:17 +00:00
Peter Collingbourne
0070e92aff Merge "Link the sanitizer runtime libraries to the default unrestricted namespace." am: 2d620c00f3
am: 41e3b68758

Change-Id: Ie138c5a1373ded873c80312b101eb5738d99a80e
2019-06-13 23:58:03 -07:00
Peter Collingbourne
563ca38154 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
2019-06-13 18:50:46 -07:00
Jiyong Park
6b5f5a202d Merge "Add libcgrouprc to ld.config.txt." am: 210b56e9a8
am: 875326a506

Change-Id: I502624287fc3cbffb7364c0a6850bae3fc5080f6
2019-06-12 08:35:13 -07:00
Min Yun
d695733df9 Add libcgrouprc to ld.config.txt.
- In GSI, media.extractor has follow dependency.
media.extractor -> libmpeg2extractor (media ns) ->
libprocessgroup (media ns) -> libcgrouprc (default ns).
If libcgroupsrc can't link from libmpeg2extractor, media.extractor is crashed.

Test: media.extractor didn't die.
Bug: 134981805
Change-Id: I7d3e7e6477708a505b87a884e05cd719f5a3d496
2019-06-12 11:19:59 +09:00
Martin Stjernholm
308fa0b38d Merge "Update TODOs for ICU library links." am: b78de85272
am: 419a3fa241

Change-Id: Ia17d7b5e8a44395aa88d11b4b0fd77146c816a4c
2019-06-06 19:29:20 -07:00
Martin Stjernholm
0d28abc5b1 Update TODOs for ICU library links.
Test: Presubmit boot test
Bug: 120786417
Bug: 134659294
Change-Id: I362e0e67c5adfd510dda12bed52629af92bfcc3d
2019-06-06 14:11:04 +01:00
Peter Collingbourne
b9b9d3754c Merge "Link the "runtime" namespace to more namespaces." am: 3e48b66578
am: 1b9a1c20db

Change-Id: Ic33fc84d752fa3fd487401f348be38c7531bfdea
2019-05-20 21:51:24 -07:00
Peter Collingbourne
3e48b66578 Merge "Link the "runtime" namespace to more namespaces." 2019-05-21 02:29:46 +00:00
vichang
17db1bef04 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" am: de725e6e75
am: 5c75fb81e8

Change-Id: I7bc0ba6a06d7b32c6de61d14658c4c3e9f43d417
2019-05-20 03:08:58 -07:00
Alistair Strachan
85ee72f0ef Merge "Add asan.permitted.paths for the media namespace" into qt-dev
am: 9924f7ee2d

Change-Id: Ia49e3e6a5d3f49c53bbbcf5c6d8e412ae3e1285e
2019-05-16 07:55:56 -07:00
Jiyong Park
78e6b181ac Add asan.permitted.paths for the media namespace
Permitted paths were empty for ASAN builds with the media namespace.

Bug: 131625115
Test: no dlopen failure on libflacextractor.so in aosp_cf_x86_pasan
Change-Id: I90050fc54820ba68d64931412572f3b0954e6616
2019-05-15 12:41:01 +09:00
Victor Chang
0c7edece94 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
2019-05-14 20:22:34 +01:00
Martin Stjernholm
2a371889e5 Merge "Reland: Fix libnativeloader to correctly link to the platform namespace." am: 2d3becd361
am: 547c7b6d44

Change-Id: I7d7f820443f1709b46a5ab7b368656b079529bbb
2019-05-02 03:56:36 -07:00
Peter Collingbourne
fb1c5a724e Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to link the HWASAN runtime in the runtime namespace to various namespaces
so that the library can be loaded from outside of the namespace.

Also, add $SANITIZER_RUNTIME_LIBRARIES to
namespace.default.link.system.shared_libs. This is necessary because in
the accompanying Soong change, we cause the HWASAN runtime to be removed
from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op
because we were already including both sets of libraries in shared_libs.

Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730
2019-05-01 18:00:33 -07:00
Martin Stjernholm
c57ed29dd5 Reland: Fix libnativeloader to correctly link to the platform namespace.
This relands http://r.android.com/951440:

This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Test: lunch aosp_cf_x86_phone-eng;
  atest android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile \
    com.android.cts.dexmetadata.InstallDexMetadataHostTest#testProfileSnapshotAfterInstall \
    installd_dexopt_test
Bug: 130293232
Bug: 121117762
Change-Id: I3d9f2102a03e83843e15bc78b5ad347220c52769
2019-05-01 16:46:06 +01:00
Martin Stjernholm
74950c035d Merge "Add linker entries for the new libdexfiled_external.so." am: cc30f4d7dd
am: a36eda0e18

Change-Id: I0f260d303bb305500ea71d0e3158a7d76cc1e850
2019-05-01 07:55:44 -07:00
Martin Stjernholm
8a50dad467 Add linker entries for the new libdexfiled_external.so.
Follow up to http://r.android.com/943476. This library is only available in
debug builds of the Runtime APEX.

Test: Flash and boot with eng build
Change-Id: I260f9b838f44ba3f8976c117d9e42fc456239e88
2019-04-30 16:11:30 +01:00
Martin Stjernholm
8dc3adfb2c Merge "Revert "Fix libnativeloader to correctly link to the platform namespace."" am: 68cf801ad9
am: affe1f2617

Change-Id: Ide5ec7791838db081c666f7aa7a137a92e4be460
2019-04-29 17:41:28 -07:00
Martin Stjernholm
b9259a9cbe Revert "Fix libnativeloader to correctly link to the platform namespace."
This reverts commit 4ca0ca67bf.

Reason for revert: Breaks android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile and others: http://g/art-team/R2nEDA1Ka_s

Change-Id: Ia6285648133d21e61040efafc73cac97d702a7c4
2019-04-29 20:57:16 +00:00
Martin Stjernholm
71a0804f95 Merge "Fix libnativeloader to correctly link to the platform namespace." am: bce25d2363
am: 487b5784b6

Change-Id: I8b96f74250d2dc2f42e2392c8b8705e5d3fd95bc
2019-04-29 08:27:05 -07:00
Martin Stjernholm
4ca0ca67bf Fix libnativeloader to correctly link to the platform namespace.
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Bug: 130293232
Bug: 121117762
Change-Id: I7ebaf5370dd0f533b1bb5f0e67e7c3c1df48e512
2019-04-29 13:09:08 +01:00
Dongwon Kang
b0bdf2685b Merge "Fix a warning on namespace.media.link.default.shared_libs" am: 4b43299132
am: 47a38645c4

Change-Id: I9101d639351cfb184a4f7f049f1bad3a13c2f9d9
2019-04-24 16:36:39 -07:00
Dongwon Kang
5744cc4e99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
Merged-In: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 23:15:24 +00:00