Skip system/bin/bootstrap/linkerconfig
Early processes can't rely on APEXes anyway. We don't need to run
linkerconfig.
This helps to reduce the storage usage (no
/system/bin/bootstrap/linkerconfig) and the boottime (not running
linkerconfig).
If we need more complicated linker config even for early processes, then
we could generate it at build-time and use it like recovery version.
Bug: 262330207
Bug: 260982509
Test: MicrodroidAppTest
Test: device boots
Change-Id: Iceca5ffdb1655fd94e90b0091f439bd22130185e
diff --git a/rootdir/init.rc b/rootdir/init.rc
index d8e6b55..55be31a 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -55,10 +55,11 @@
# Read more in b/136247322
write /sys/module/dm_verity/parameters/prefetch_cluster 0
- # Generate ld.config.txt for early executed processes
- exec -- /system/bin/bootstrap/linkerconfig --target /linkerconfig/bootstrap
+ # Generate empty ld.config.txt for early executed processes which rely on
+ # /system/lib libraries.
+ write /linkerconfig/bootstrap/ld.config.txt \#
+ write /linkerconfig/default/ld.config.txt \#
chmod 644 /linkerconfig/bootstrap/ld.config.txt
- copy /linkerconfig/bootstrap/ld.config.txt /linkerconfig/default/ld.config.txt
chmod 644 /linkerconfig/default/ld.config.txt
# Mount bootstrap linker configuration as current