Lines Matching refs:memsz
161 vaddr_t addr, size_t memsz) in check_phdr_in_range() argument
165 if (ADD_OVERFLOW(addr, memsz, &max_addr)) in check_phdr_in_range()
195 vaddr_t addr, size_t memsz) in save_hashtab_from_segment() argument
206 check_phdr_in_range(elf, type, addr, memsz); in save_hashtab_from_segment()
213 assert(!(memsz % dyn_entsize)); in save_hashtab_from_segment()
214 num_dyns = memsz / dyn_entsize; in save_hashtab_from_segment()
292 vaddr_t addr, size_t memsz) in save_soname_from_segment() argument
309 assert(!(memsz % dyn_entsize)); in save_soname_from_segment()
310 num_dyns = memsz / dyn_entsize; in save_soname_from_segment()
487 size_t filesz, size_t memsz, size_t flags, size_t align) in add_segment() argument
494 if (memsz < filesz) in add_segment()
500 seg->memsz = memsz; in add_segment()
586 assert(!ADD_OVERFLOW(seg->vaddr, seg->memsz, &dummy)); in adjust_segments()
587 assert(seg->filesz <= seg->memsz); in adjust_segments()
593 assert(seg->vaddr >= prev_seg->vaddr + prev_seg->memsz); in adjust_segments()
609 prev_end_addr = prev_seg->vaddr + prev_seg->memsz; in adjust_segments()
628 assert(prev_seg->memsz == prev_seg->filesz); in adjust_segments()
637 prev_seg->memsz = seg->vaddr + seg->memsz - in adjust_segments()
661 seg->memsz += seg->vaddr - rounddown(seg->vaddr); in adjust_segments()
678 size_t pad_end = roundup(last_seg->vaddr + last_seg->memsz - in populate_segments_legacy()
679 seg->vaddr - seg->memsz); in populate_segments_legacy()
680 size_t num_bytes = roundup(seg->memsz); in populate_segments_legacy()
743 size_t pad_end = roundup(last_seg->vaddr + last_seg->memsz - in populate_segments()
744 seg->vaddr - seg->memsz); in populate_segments()
747 size_t num_bytes = roundup(seg->vaddr + seg->memsz) - in populate_segments()
762 size_t memsz = seg->memsz; in populate_segments() local
779 if (vaddr + memsz <= SMALL_PAGE_SIZE) in populate_segments()
788 num_bytes = roundup(vaddr + memsz) - in populate_segments()
803 memsz -= SMALL_PAGE_SIZE; in populate_segments()
830 res = sys_map_zi(memsz, 0, &va, pad_begin, in populate_segments()
833 res = sys_map_zi(memsz, 0, &va, 0, in populate_segments()
842 if (filesz != memsz) in populate_segments()
859 elf->max_addr = roundup(va + memsz); in populate_segments()
875 res = sys_set_prot(va, seg->memsz, flags); in ta_elf_add_bti()
969 roundup(seg->vaddr + seg->memsz)); in map_segments()
972 roundup(seg->vaddr + seg->memsz)); in map_segments()
983 vaddr_t addr, size_t memsz) in add_deps_from_segment() argument
997 check_phdr_in_range(elf, type, addr, memsz); in add_deps_from_segment()
1004 assert(!(memsz % dyn_entsize)); in add_deps_from_segment()
1005 num_dyns = memsz / dyn_entsize; in add_deps_from_segment()
1108 num_bytes = roundup(seg->vaddr + seg->memsz) - in clean_elf_load_main()
1111 num_bytes = seg->memsz; in clean_elf_load_main()
1291 res = sys_set_prot(va, seg->memsz, flags); in ta_elf_finalize_mappings()
1420 sz = roundup(seg->vaddr + seg->memsz) - in ta_elf_print_mappings()
1569 vaddr_t addr, size_t memsz, vaddr_t *init, in get_init_fini_array() argument
1582 check_phdr_in_range(elf, type, addr, memsz); in get_init_fini_array()
1592 assert(!(memsz % dyn_entsize)); in get_init_fini_array()
1593 num_dyns = memsz / dyn_entsize; in get_init_fini_array()