Changeset View
Changeset View
Standalone View
Standalone View
libexec/rtld-elf/map_object.c
Show First 20 Lines • Show All 319 Lines • ▼ Show 20 Lines | map_object(int fd, const char *path, const struct stat *sb) | ||||
obj->tlssize = phtls->p_memsz; | obj->tlssize = phtls->p_memsz; | ||||
obj->tlsalign = phtls->p_align; | obj->tlsalign = phtls->p_align; | ||||
obj->tlspoffset = phtls->p_offset; | obj->tlspoffset = phtls->p_offset; | ||||
obj->tlsinitsize = phtls->p_filesz; | obj->tlsinitsize = phtls->p_filesz; | ||||
obj->tlsinit = mapbase + phtls->p_vaddr; | obj->tlsinit = mapbase + phtls->p_vaddr; | ||||
} | } | ||||
obj->stack_flags = stack_flags; | obj->stack_flags = stack_flags; | ||||
obj->relro_page = obj->relocbase + trunc_page(relro_page); | obj->relro_page = obj->relocbase + trunc_page(relro_page); | ||||
obj->relro_size = round_page(relro_size); | obj->relro_size = trunc_page(relro_page + relro_size) - | ||||
trunc_page(relro_page); | |||||
if (note_start < note_end) | if (note_start < note_end) | ||||
digest_notes(obj, note_start, note_end); | digest_notes(obj, note_start, note_end); | ||||
if (note_map != NULL) | if (note_map != NULL) | ||||
munmap(note_map, note_map_len); | munmap(note_map, note_map_len); | ||||
munmap(hdr, PAGE_SIZE); | munmap(hdr, PAGE_SIZE); | ||||
return (obj); | return (obj); | ||||
error1: | error1: | ||||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |