diff --git a/linker/linker.cpp b/linker/linker.cpp index a032068a6..16bb47cc6 100644 --- a/linker/linker.cpp +++ b/linker/linker.cpp @@ -4017,7 +4017,6 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW( // Extract information passed from the kernel. si->phdr = reinterpret_cast(args.getauxval(AT_PHDR)); si->phnum = args.getauxval(AT_PHNUM); - si->entry = args.getauxval(AT_ENTRY); /* Compute the value of si->base. We can't rely on the fact that * the first entry is the PHDR because this will not be true @@ -4146,8 +4145,9 @@ static ElfW(Addr) __linker_init_post_relocation(KernelArgumentBlock& args, ElfW( fflush(stdout); #endif - TRACE("[ Ready to execute '%s' @ %p ]", si->get_realpath(), reinterpret_cast(si->entry)); - return si->entry; + ElfW(Addr) entry = args.getauxval(AT_ENTRY); + TRACE("[ Ready to execute '%s' @ %p ]", si->get_realpath(), reinterpret_cast(entry)); + return entry; } /* Compute the load-bias of an existing executable. This shall only diff --git a/linker/linker.h b/linker/linker.h index 389c5b362..c669c46a6 100644 --- a/linker/linker.h +++ b/linker/linker.h @@ -173,7 +173,9 @@ struct soinfo { public: const ElfW(Phdr)* phdr; size_t phnum; - ElfW(Addr) entry; +#if defined(__work_around_b_24465209__) + ElfW(Addr) unused0; // DO NOT USE, maintained for compatibility. +#endif ElfW(Addr) base; size_t size;