diff options
author | Elliott Hughes <enh@google.com> | 2017-09-15 16:09:22 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2017-09-15 16:18:49 -0700 |
commit | 7b0af7ad82fcf88e800d1a553d81fda29dc064bd (patch) | |
tree | 4cf982c55c48b49864bcb4f986c7400d640930e0 /linker/linker_main.cpp | |
parent | 3b64f8ecb3db49574cc5b7c6030be98c159be4d4 (diff) |
Always log errno when aborting.
(Where errno is relevant.)
Also consistently use -1 as the fd for anonymous mmaps. (It doesn't matter,
but it's more common, and potentially more intention-revealing.)
Bug: http://b/65608572
Test: ran tests
Change-Id: Ie9a207632d8242f42086ba3ca862519014c3c102
Diffstat (limited to 'linker/linker_main.cpp')
-rw-r--r-- | linker/linker_main.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/linker/linker_main.cpp b/linker/linker_main.cpp index e8b02d675..3862d8ca3 100644 --- a/linker/linker_main.cpp +++ b/linker/linker_main.cpp @@ -276,11 +276,8 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args) { const char* executable_path = get_executable_path(); soinfo* si = soinfo_alloc(&g_default_namespace, executable_path, &file_stat, 0, RTLD_GLOBAL); - if (si == nullptr) { - async_safe_fatal("Couldn't allocate soinfo: out of memory?"); - } - /* bootstrap the link map, the main exe always needs to be first */ + // Bootstrap the link map, the main exe always needs to be first. si->set_main_executable(); link_map* map = &(si->link_map_head); |