Merge "Update linkerconfig to target out directory"

am: 24ccfc244b

Change-Id: I074b42411163b0aec47e7385ec8fbc3abbe33e87
This commit is contained in:
Kiyoung Kim 2020-01-01 20:20:08 -08:00 committed by android-build-merger
commit 3dfaad538f
2 changed files with 2 additions and 7 deletions

View file

@ -1179,7 +1179,7 @@ static Result<void> do_mark_post_data(const BuiltinArguments& args) {
static Result<void> GenerateLinkerConfiguration() {
const char* linkerconfig_binary = "/system/bin/linkerconfig";
const char* linkerconfig_target = "/linkerconfig/ld.config.txt";
const char* linkerconfig_target = "/linkerconfig";
const char* arguments[] = {linkerconfig_binary, "--target", linkerconfig_target};
if (logwrap_fork_execvp(arraysize(arguments), arguments, nullptr, false, LOG_KLOG, false,
@ -1187,11 +1187,6 @@ static Result<void> GenerateLinkerConfiguration() {
return ErrnoError() << "failed to execute linkerconfig";
}
mode_t mode = get_mode("0444");
if (fchmodat(AT_FDCWD, linkerconfig_target, mode, AT_SYMLINK_NOFOLLOW) < 0) {
return ErrnoErrorIgnoreEnoent() << "fchmodat() failed";
}
LOG(INFO) << "linkerconfig generated " << linkerconfig_target
<< " with mounted APEX modules info";

View file

@ -43,7 +43,7 @@ on early-init
mkdir /linkerconfig/default 0755
# Generate ld.config.txt for early executed processes
exec -- /system/bin/linkerconfig --target /linkerconfig/bootstrap/ld.config.txt
exec -- /system/bin/linkerconfig --target /linkerconfig/bootstrap
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