diff options
author | Christopher R. Palmer <crpalmer@gmail.com> | 2015-11-03 16:44:44 -0500 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2015-11-07 01:16:16 -0800 |
commit | 8a044e6e632b6221b8a0dc2df918d7b01a77fb98 (patch) | |
tree | 59b8feb2605ddcb238ad49402b6295c8fb34350d /libm | |
parent | cc20e751ce2c40ead4938cc7addc94100f9793c6 (diff) | |
download | bionic-8a044e6e632b6221b8a0dc2df918d7b01a77fb98.zip bionic-8a044e6e632b6221b8a0dc2df918d7b01a77fb98.tar.gz bionic-8a044e6e632b6221b8a0dc2df918d7b01a77fb98.tar.bz2 |
linker: Add support for dynamic "shim" libs
Add a new environment variable
LD_SHIM_LIBS
that is a colon (":") separated list of vertical bar ("|") separated pairs.
The pairs are the name for a soinfo reference (executable or shared library)
followed by the name of the shim library to load. For example:
LD_SHIM_LIBS=rmt_storage|libshim_ioprio.so:/system/lib/libicuuv.so|libshim_icu53.so
will instruct the linker to load the dynamic library libshim_ioprio.so
whenver rmt_storage is executed [*] and will load libshim_icu53.so whenever
any executable or other shared library links against /system/lib/libicuuv.so.
There are no restrictions against circular references. In this example,
libshim_icu53.so can link against libicuuv.so which provides a simple and
convenient means of adding compatibility symbols.
[*] Note that the absolute path is not available to the linker and therefore
using the name of executables does depend on the invocation and therefore
should only be used if absolutely necessary. That is, running
/system/bin/rmt_storage would not load any shim libs in this example because
it does not match the name of the invocation of the command.
If you have trouble determining the sonames being loaded, you can also set
the environment variable LD_DEBUG=1 which will cause additional information
to be logged to help trace the detection of the shim libs.
Change-Id: I0ef80fa466167f7bcb7dac90842bef1c3cf879b6
Diffstat (limited to 'libm')
0 files changed, 0 insertions, 0 deletions