summaryrefslogtreecommitdiff
path: root/linker
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2020-11-06 09:27:36 -0800
committerElliott Hughes <enh@google.com>2020-11-06 09:28:16 -0800
commit658b938700c7c9c7aed17c30863c6cd7219d899b (patch)
tree0290f0061f2bb96a5d4a3ceaed73b72bbc7b9ab8 /linker
parent55180dda00210f90446ce0be87f0deeb9a0cbca7 (diff)
linker: add ld.config.txt parse time to systrace.
Bug: http://b/172640358 Test: treehugger Change-Id: I9d6b7c1e200d2effb737508d3c282063edefa888
Diffstat (limited to 'linker')
-rw-r--r--linker/linker.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 77f754cf4..2481be4e4 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3458,23 +3458,19 @@ std::vector<android_namespace_t*> init_default_namespaces(const char* executable
const Config* config = nullptr;
- std::string error_msg;
-
- std::string ld_config_file_path = get_ld_config_file_path(executable_path);
-
- INFO("[ Reading linker config \"%s\" ]", ld_config_file_path.c_str());
- if (!Config::read_binary_config(ld_config_file_path.c_str(),
- executable_path,
- g_is_asan,
- &config,
- &error_msg)) {
- if (!error_msg.empty()) {
- DL_WARN("Warning: couldn't read \"%s\" for \"%s\" (using default configuration instead): %s",
- ld_config_file_path.c_str(),
- executable_path,
- error_msg.c_str());
- }
- config = nullptr;
+ {
+ std::string ld_config_file_path = get_ld_config_file_path(executable_path);
+ INFO("[ Reading linker config \"%s\" ]", ld_config_file_path.c_str());
+ ScopedTrace trace(("linker config " + ld_config_file_path).c_str());
+ std::string error_msg;
+ if (!Config::read_binary_config(ld_config_file_path.c_str(), executable_path, g_is_asan,
+ &config, &error_msg)) {
+ if (!error_msg.empty()) {
+ DL_WARN("Warning: couldn't read '%s' for '%s' (using default configuration instead): %s",
+ ld_config_file_path.c_str(), executable_path, error_msg.c_str());
+ }
+ config = nullptr;
+ }
}
if (config == nullptr) {