Replace abort with exit(1) in __linker_cannot_link

Bug: http://b/67038409
Test: bionic-unit-tests
Change-Id: I7d39b44f2da8c5111ac8a9faf3416f19d5a35c05
This commit is contained in:
dimitry 2017-09-29 11:52:17 +02:00
parent bd2754177f
commit 04f7a798cf
2 changed files with 12 additions and 2 deletions

View File

@ -208,7 +208,17 @@ static char kLinkerPath[] = "/system/bin/linker";
#endif
static void __linker_cannot_link(const char* argv0) {
async_safe_fatal("CANNOT LINK EXECUTABLE \"%s\": %s", argv0, linker_get_error_buffer());
async_safe_format_fd(STDERR_FILENO,
"CANNOT LINK EXECUTABLE \"%s\": %s\n",
argv0,
linker_get_error_buffer());
async_safe_format_log(ANDROID_LOG_FATAL,
"linker",
"CANNOT LINK EXECUTABLE \"%s\": %s",
argv0,
linker_get_error_buffer());
_exit(EXIT_FAILURE);
}
/*

View File

@ -162,7 +162,7 @@ TEST(dl, exec_without_ld_config_file) {
chmod(helper.c_str(), 0755);
ExecTestHelper eth;
eth.SetArgs({ helper.c_str(), nullptr });
eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, -6, error_message.c_str());
eth.Run([&]() { execve(helper.c_str(), eth.GetArgs(), eth.GetEnv()); }, EXIT_FAILURE, error_message.c_str());
#endif
}