MFC r304012:
Fill phdr and phsize for rtld object.
This commit is contained in:
parent
09dd4f1c67
commit
c0bb62a13c
@ -1872,6 +1872,7 @@ static void
|
||||
init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info)
|
||||
{
|
||||
Obj_Entry objtmp; /* Temporary rtld object */
|
||||
const Elf_Ehdr *ehdr;
|
||||
const Elf_Dyn *dyn_rpath;
|
||||
const Elf_Dyn *dyn_soname;
|
||||
const Elf_Dyn *dyn_runpath;
|
||||
@ -1910,6 +1911,9 @@ init_rtld(caddr_t mapbase, Elf_Auxinfo **aux_info)
|
||||
|
||||
relocate_objects(&objtmp, true, &objtmp, 0, NULL);
|
||||
}
|
||||
ehdr = (Elf_Ehdr *)mapbase;
|
||||
objtmp.phdr = (Elf_Phdr *)((char *)mapbase + ehdr->e_phoff);
|
||||
objtmp.phsize = ehdr->e_phnum * sizeof(objtmp.phdr[0]);
|
||||
|
||||
/* Initialize the object list. */
|
||||
TAILQ_INIT(&obj_list);
|
||||
|
Loading…
x
Reference in New Issue
Block a user