summaryrefslogtreecommitdiff
path: root/linker/linker_config.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2020-08-02 14:48:01 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2020-08-02 14:48:01 +0000
commit0f4bdb04fb4b803bbf19850c86cc9270d64a06b9 (patch)
tree7b49e6acf916ebd6d20d7136baf1e804c3366eeb /linker/linker_config.cpp
parent89f907cfe444cc0f78de683549ec1350da36e39e (diff)
parent30f2f053f27731e091923a162b91439ee667944f (diff)
Merge "linker: Cleanup for Android's inclusive language guidance"
Diffstat (limited to 'linker/linker_config.cpp')
-rw-r--r--linker/linker_config.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/linker/linker_config.cpp b/linker/linker_config.cpp
index aaa3a0314..1771e8706 100644
--- a/linker/linker_config.cpp
+++ b/linker/linker_config.cpp
@@ -326,7 +326,8 @@ static bool parse_config_file(const char* ld_config_file_path,
(*properties)[name].append_value(std::move(value));
} else if (android::base::EndsWith(name, ".paths") ||
android::base::EndsWith(name, ".shared_libs") ||
- android::base::EndsWith(name, ".whitelisted")) {
+ android::base::EndsWith(name, ".whitelisted") ||
+ android::base::EndsWith(name, ".allowed_libs")) {
value = ":" + value;
(*properties)[name].append_value(std::move(value));
} else {
@@ -564,10 +565,15 @@ bool Config::read_binary_config(const char* ld_config_file_path,
ns_config->set_isolated(properties.get_bool(property_name_prefix + ".isolated"));
ns_config->set_visible(properties.get_bool(property_name_prefix + ".visible"));
- std::string whitelisted =
+ std::string allowed_libs =
properties.get_string(property_name_prefix + ".whitelisted", &lineno);
- if (!whitelisted.empty()) {
- ns_config->set_whitelisted_libs(android::base::Split(whitelisted, ":"));
+ const std::string libs = properties.get_string(property_name_prefix + ".allowed_libs", &lineno);
+ if (!allowed_libs.empty() && !libs.empty()) {
+ allowed_libs += ":";
+ }
+ allowed_libs += libs;
+ if (!allowed_libs.empty()) {
+ ns_config->set_allowed_libs(android::base::Split(allowed_libs, ":"));
}
// these are affected by is_asan flag