Lines Matching refs:seg
737 struct elf32_fdpic_loadseg *seg; in elf_fdpic_map_file() local
753 size = sizeof(*loadmap) + nloads * sizeof(*seg); in elf_fdpic_map_file()
764 seg = loadmap->segs; in elf_fdpic_map_file()
785 seg = loadmap->segs; in elf_fdpic_map_file()
786 for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { in elf_fdpic_map_file()
787 if (params->hdr.e_entry >= seg->p_vaddr && in elf_fdpic_map_file()
788 params->hdr.e_entry < seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file()
790 (params->hdr.e_entry - seg->p_vaddr) + in elf_fdpic_map_file()
791 seg->addr; in elf_fdpic_map_file()
810 seg = loadmap->segs; in elf_fdpic_map_file()
811 for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { in elf_fdpic_map_file()
812 if (phdr->p_vaddr >= seg->p_vaddr && in elf_fdpic_map_file()
814 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file()
816 (phdr->p_vaddr - seg->p_vaddr) + in elf_fdpic_map_file()
817 seg->addr + in elf_fdpic_map_file()
831 seg = loadmap->segs; in elf_fdpic_map_file()
832 for (loop = loadmap->nsegs; loop > 0; loop--, seg++) { in elf_fdpic_map_file()
833 if (phdr->p_vaddr >= seg->p_vaddr && in elf_fdpic_map_file()
835 seg->p_vaddr + seg->p_memsz) { in elf_fdpic_map_file()
837 (phdr->p_vaddr - seg->p_vaddr) + in elf_fdpic_map_file()
838 seg->addr; in elf_fdpic_map_file()
864 seg = mseg + 1; in elf_fdpic_map_file()
867 if (seg->p_vaddr - mseg->p_vaddr == seg->addr - mseg->addr) { in elf_fdpic_map_file()
869 if (load_addr == (seg->addr & PAGE_MASK)) { in elf_fdpic_map_file()
873 mseg->p_memsz += seg->addr & ~PAGE_MASK; in elf_fdpic_map_file()
874 mseg->p_memsz += seg->p_memsz; in elf_fdpic_map_file()
881 if (mseg != seg) in elf_fdpic_map_file()
882 *mseg = *seg; in elf_fdpic_map_file()
891 seg = loadmap->segs; in elf_fdpic_map_file()
892 for (loop = 0; loop < loadmap->nsegs; loop++, seg++) in elf_fdpic_map_file()
895 seg->addr, seg->addr + seg->p_memsz - 1, in elf_fdpic_map_file()
896 seg->p_vaddr, seg->p_memsz); in elf_fdpic_map_file()
916 struct elf32_fdpic_loadseg *seg; in elf_fdpic_map_file_constdisp_on_uclinux() local
923 seg = params->loadmap->segs; in elf_fdpic_map_file_constdisp_on_uclinux()
961 seg->addr = maddr + (phdr->p_vaddr - base); in elf_fdpic_map_file_constdisp_on_uclinux()
962 seg->p_vaddr = phdr->p_vaddr; in elf_fdpic_map_file_constdisp_on_uclinux()
963 seg->p_memsz = phdr->p_memsz; in elf_fdpic_map_file_constdisp_on_uclinux()
965 ret = file->f_op->read(file, (void *) seg->addr, in elf_fdpic_map_file_constdisp_on_uclinux()
972 params->elfhdr_addr = seg->addr; in elf_fdpic_map_file_constdisp_on_uclinux()
976 clear_user((void *) (seg->addr + phdr->p_filesz), in elf_fdpic_map_file_constdisp_on_uclinux()
982 mm->start_code = seg->addr; in elf_fdpic_map_file_constdisp_on_uclinux()
983 mm->end_code = seg->addr + in elf_fdpic_map_file_constdisp_on_uclinux()
987 mm->start_data = seg->addr; in elf_fdpic_map_file_constdisp_on_uclinux()
989 mm->end_data = seg->addr + phdr->p_memsz; in elf_fdpic_map_file_constdisp_on_uclinux()
994 if (seg->addr + phdr->p_memsz > mm->end_data) in elf_fdpic_map_file_constdisp_on_uclinux()
995 mm->end_data = seg->addr + phdr->p_memsz; in elf_fdpic_map_file_constdisp_on_uclinux()
999 seg++; in elf_fdpic_map_file_constdisp_on_uclinux()
1014 struct elf32_fdpic_loadseg *seg; in elf_fdpic_map_file_by_direct_mmap() local
1023 seg = params->loadmap->segs; in elf_fdpic_map_file_by_direct_mmap()
1105 seg->addr = maddr + disp; in elf_fdpic_map_file_by_direct_mmap()
1106 seg->p_vaddr = phdr->p_vaddr; in elf_fdpic_map_file_by_direct_mmap()
1107 seg->p_memsz = phdr->p_memsz; in elf_fdpic_map_file_by_direct_mmap()
1111 params->elfhdr_addr = seg->addr; in elf_fdpic_map_file_by_direct_mmap()
1176 seg++; in elf_fdpic_map_file_by_direct_mmap()