commit | 2adf66ebb3fdfec8ee52a4bad353de0efb452c6e | [log] [tgz] |
---|---|---|
author | Kiyoung Kim <kiyoungkim@google.com> | Tue Nov 10 10:46:09 2020 +0900 |
committer | Kiyoung Kim <kiyoungkim@google.com> | Thu Nov 12 16:18:56 2020 +0900 |
tree | 847c3ecff57c249844bf1b4817c21b17910cc433 | |
parent | 180ec044ba6449d9bea354ff0a5519a2b4e5b470 [diff] |
Verify if APEX has any link with all libs allowed APEX modules should link to other namespaces with exact library list rather than just allowing all libs to keep track of dependencies. This change verifies if there are any APEX (except ART) which contains link with all libs allowed. Bug: 159302165 Test: atest passed Change-Id: Ifdd7de179f8d420ec548b8ab11fcd137ceb1a3aa
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.
linker.config.json file is in json format which can contain properties as below.
Property Name | Type | Description |
---|---|---|
permittedPaths | List | Additional permitted paths |
visible | bool | Force APEX namespace to be visible from all sections if the value is true |
{ "permittedPaths" : [ "/a", "/b/c", "/d/e/f"], "visible": true }
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.