From ea2b683f6e886a595f59cb07c5f90383c9579035 Mon Sep 17 00:00:00 2001 From: Kiyoung Kim Date: Tue, 17 Dec 2019 15:05:54 +0900 Subject: Do not execute linkerconfig from recovery Linkerconfig binary itself should be built as static, so size of executable is hard to be reduced. However, this used lots of space from recovery so only small space left in it. To avoid this linker config from recovery should be generated within build time and use prebuilt one. Prebuilt ld.config.txt will be located under /system/etc as before, and init will copy the file into /linkerconfig so we can use same location for both recovery and normal boot. Bug: 146384333 Test: m -j passed && crosshatch bootloader worked with this change Change-Id: I96300f1c8301167234787274820086a4c6ea0e6e --- etc/init.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/init.rc b/etc/init.rc index 395e627bf..3ec45db2f 100644 --- a/etc/init.rc +++ b/etc/init.rc @@ -4,8 +4,8 @@ on early-init # Set the security context of /postinstall if present. restorecon /postinstall - # Generate ld.config.txt for recovery processes - exec u:r:linkerconfig:s0 -- /system/bin/linkerconfig --target /linkerconfig/ld.config.txt + # Copy prebuilt ld.config.txt into linkerconfig directory + copy /system/etc/ld.config.txt /linkerconfig/ld.config.txt chmod 444 /linkerconfig/ld.config.txt start ueventd -- cgit v1.2.3