Remove Obj_Entry textsize member.

It is unused after r340102, and more important, I do not see how to
define textsize in both practically useful and correct way, for binaries
with more that one executable segments.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Konstantin Belousov 2018-11-04 00:32:28 +00:00
parent 32a8ec8bdd
commit 561991144e
3 changed files with 0 additions and 6 deletions

View File

@ -287,7 +287,6 @@ map_object(int fd, const char *path, const struct stat *sb)
}
obj->mapbase = mapbase;
obj->mapsize = mapsize;
obj->textsize = text_end - base_vaddr;
obj->vaddrbase = base_vaddr;
obj->relocbase = mapbase - base_vaddr;
obj->dynamic = (const Elf_Dyn *)(obj->relocbase + phdyn->p_vaddr);

View File

@ -1415,10 +1415,6 @@ digest_phdr(const Elf_Phdr *phdr, int phnum, caddr_t entry, const char *path)
obj->vaddrbase;
}
nsegs++;
if ((ph->p_flags & PF_X) == PF_X) {
obj->textsize = MAX(obj->textsize,
round_page(ph->p_vaddr + ph->p_memsz) - obj->vaddrbase);
}
break;
case PT_DYNAMIC:

View File

@ -151,7 +151,6 @@ typedef struct Struct_Obj_Entry {
/* These items are computed by map_object() or by digest_phdr(). */
caddr_t mapbase; /* Base address of mapped region */
size_t mapsize; /* Size of mapped region in bytes */
size_t textsize; /* Size of text segment in bytes */
Elf_Addr vaddrbase; /* Base address in shared object file */
caddr_t relocbase; /* Relocation constant = mapbase - vaddrbase */
const Elf_Dyn *dynamic; /* Dynamic section */