loader: Don't reserve space for symbols twice.

The current code bumps lastaddr twice for the symbol table
location. However, the first bump is bogus and results in wasted
space. Remove it.

PR:			110995
Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D31017
This commit is contained in:
Warner Losh 2021-07-12 15:17:05 -06:00
parent 5eb61f6c65
commit 297e9f364b

View file

@ -282,8 +282,6 @@ __elfN(obj_loadimage)(struct preloaded_file *fp, elf_file_t ef, uint64_t off)
case SHT_SYMTAB:
nsym++;
ef->symtabindex = i;
shdr[i].sh_addr = (Elf_Addr)lastaddr;
lastaddr += shdr[i].sh_size;
break;
}
}