Remove the write-only variable phent. We currently do not check the

size of the program header's entries.

Reported by:	adrian (by using gcc 4.9)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2015-05-20 15:37:15 +00:00
parent 3f48075933
commit 60a8e659bb

View File

@ -149,10 +149,8 @@ static void
dl_init_phdr_info(void)
{
Elf_Auxinfo *auxp;
size_t phent;
unsigned int i;
phent = 0;
for (auxp = __elf_aux_vector; auxp->a_type != AT_NULL; auxp++) {
switch (auxp->a_type) {
case AT_BASE:
@ -165,9 +163,6 @@ dl_init_phdr_info(void)
phdr_info.dlpi_phdr =
(const Elf_Phdr *)auxp->a_un.a_ptr;
break;
case AT_PHENT:
phent = auxp->a_un.a_val;
break;
case AT_PHNUM:
phdr_info.dlpi_phnum = (Elf_Half)auxp->a_un.a_val;
break;