hikiro
hikiro

Reputation: 41

VNDK namespaces are missing in linker configuration file(ld.config.txt) in Android

I am working with Android-13. I enabled VNDK by BOARD_VNDK_VERSION := current . When i checked the linker configuration file(ld.config.txt) in /linkerconfig/ld.config.txt i didn't find the vndk namespaces(like namespace.vndk.search.paths = /system/apex/com.android.vndk.33/ ). What i have to do for getting the VNDK namespaces in the linker configuration file. With this my error

CANNOT LINK EXECUTABLE "/vendor/bin/hw/[email protected]": library "libminijail.so" not found: needed by /vendor/lib/libavservices_minijail.so in namespace (default)

will be resolved. what i am expecting was, my linker configuration file should contain something specific to VNDK like :

....
namespace.vndk.isolated = true
namespace.vndk.search.paths = /system/apex/com.android.vndk.33/
namespace.vndk.permitted.paths = /system/apex/com.android.vndk.33/
namespace.vndk.links = default
....

I tried enabling the VNDK through BOARD_VNDK_VERSION := current

Upvotes: 1

Views: 574

Answers (1)

Roman
Roman

Reputation: 11

Linker configuration files like /etc/ld.config.txt etc, are not loaded anymore. The linker configuration is hardcoded in the linkerconfig binary. The /system/bin/linkerconfg binary is started by the init somewhen at the early boot stage. You may add an extra path to the vndk namespace in the $TOP/system/linkerconfig/ source and make a new build, but often this is not needed. Please take a look at the Android linker namespaces concept. Also vndk snapshots may be helpful.

Considering your problem, I would suggest to place the libminijail.so binary to the /vendor/lib/ directory, please see the library search paths allowed for vndk namespace: grep -r vndk /linkerconfig/.

Upvotes: 0

Related Questions