From: Dimitry Ivanov Date: Tue, 16 Feb 2016 21:25:29 +0000 (-0800) Subject: linker: remove soinfo::entry X-Git-Tag: android-x86-8.1-r1~1074^2~4^2~1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e687d067c6ecea18327fd60cb63a11208d9adc24;p=android-x86%2Fbionic.git linker: remove soinfo::entry This field is used only once and only for main executable; no need to carry it around in soinfo structure. Change-Id: I7f80c64e0939e28966b6fed858891f9ce2a9e26b --- 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;