Print error when prelink fails for main executable

Bug: 18931021
Change-Id: Ib6c39a409161b20a10c3485272c73bc2abd4ee4f
(cherry picked from commit d9e211ca1f)
This commit is contained in:
Dmitriy Ivanov 2015-01-07 15:48:25 -08:00
parent d3de1ddef1
commit 6718125ac7
1 changed files with 4 additions and 1 deletions

View File

@ -2717,7 +2717,10 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW(
somain = si;
si->prelink_image();
if (!si->prelink_image()) {
__libc_format_fd(2, "CANNOT LINK EXECUTABLE: %s\n", linker_get_error_buffer());
exit(EXIT_FAILURE);
}
// add somain to global group
si->set_dt_flags_1(si->get_dt_flags_1() | DF_1_GLOBAL);