Merge "Use generated linker config for APEX binaries"
This commit is contained in:
commit
a399ede44e
1 changed files with 6 additions and 0 deletions
|
@ -3447,6 +3447,12 @@ static std::vector<android_namespace_t*> init_default_namespace_no_config(bool i
|
|||
static std::string get_ld_config_file_apex_path(const char* executable_path) {
|
||||
std::vector<std::string> paths = android::base::Split(executable_path, "/");
|
||||
if (paths.size() >= 5 && paths[1] == "apex" && paths[3] == "bin") {
|
||||
// Check auto-generated ld.config.txt first
|
||||
std::string generated_apex_config = "/linkerconfig/" + paths[2] + "/ld.config.txt";
|
||||
if (file_exists(generated_apex_config.c_str())) {
|
||||
return generated_apex_config;
|
||||
}
|
||||
|
||||
return std::string("/apex/") + paths[2] + "/etc/ld.config.txt";
|
||||
}
|
||||
return "";
|
||||
|
|
Loading…
Reference in a new issue