tag | edc8a794736467f8ec67a18ed92db14fc0596405 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Tue May 14 16:44:05 2024 -0700 |
object | 19c7ee8e1dc7cf34682c65ab0c9fa2e98733c29d |
Android 14.0.0 release 42
commit | 19c7ee8e1dc7cf34682c65ab0c9fa2e98733c29d | [log] [tgz] |
---|---|---|
author | Kiyoung Kim <kiyoungkim@google.com> | Wed Apr 19 10:34:43 2023 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Apr 19 10:34:43 2023 +0000 |
tree | 0529268acfe580b8faf7de1ee911783f306fd4e4 | |
parent | c25f56e23a45c08b365e93ffe85a3c2fcd665691 [diff] | |
parent | 256eec1478ed2e0b5e44a8cfa211a80292f8a5d9 [diff] |
Run diff tests in parallel am: c435cbd0e5 am: ec91d3a5e6 am: a90f8d4590 am: 256eec1478 Original change: https://android-review.googlesource.com/c/platform/system/linkerconfig/+/2539972 Change-Id: I409501c955cf15bb8cbffb28e24fa80793fda122 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Linkerconfig is a program to generate linker configuration based on the runtime environment. Linkerconfig generates one or more ld.config.txt files and some other files under /linkerconfig during init. Linker will read this generated configuration file(s) to find out link relationship between libraries and executable.
TODO: explain inputs (e.g. /system/etc/public.libraries.txt, /apex/apex-info-list.xml, ..)
Linker configuration file can be used to add extra information while linkerconfig creates linker configuration with the module. This module can be defined as linker_config
from Soong, and it will be translated as protobuf file at build time.
A linker configuration file(linker.config.json) is compiled into a protobuf at build time by conv_linker_config
. You can find the compiled file under <base>/etc/linker.config.pb
. For example, /apex/com.android.art/etc/linker.config.pb
is a configuration for the com.android.art
APEX.
/system/etc/linker.config.pb
(or its source module system_linker_config
) is special because its provideLibs
key is generated at build time.
linker.config.json file is in json format which can contain properties as below.
Property Name | Type | Description | Allowed module |
---|---|---|---|
permittedPaths | List | Additional permitted paths | APEX |
visible | bool | Force APEX namespace to be visible from all sections if the value is true | APEX |
provideLibs | List | Libraries providing from the module | System |
requireLibs | List | Libraries required from the module | System |
{ "permittedPaths" : [ "/a", "/b/c", "/d/e/f"], "visible": true }
{ "provideLibs" : [ "a.so", "b.so", "c.so" ], "requireLibs" : [ "foo.so", "bar.so", "baz.so" ] }
TODO: a few words about the files
Check ld.config.format.md.
The file describes libraries exposed from APEXes. libnativeloader is the main consumer of this file.
# comment line jni com_android_foo libfoo_jni.so public com_android_bar libbar.so:libbaz.so
The file is line-based and each line consists of tag apex_namespace library_list
.
tag
explains what library_list
is.apex_namespace
is the namespace of the apex. Note that it is mangled like com_android_foo
for the APEX(“com.android.foo”).library_list
is colon-separated list of library names.tag
is jni
, library_list
is the list of JNI libraries exposed by apex_namespace
.tag
is public
, library_list
is the list of public libraries exposed by apex_namespace
. Here, public libraries are the libs listed in /system/etc/public.libraries.txt.