Lines Matching refs:seg
405 struct elf_seg *seg; in parse_elf_segs() local
432 seg = *segs + *seg_cnt; in parse_elf_segs()
435 seg->start = phdr.p_vaddr; in parse_elf_segs()
436 seg->end = phdr.p_vaddr + phdr.p_memsz; in parse_elf_segs()
437 seg->offset = phdr.p_offset; in parse_elf_segs()
438 seg->is_exec = phdr.p_flags & PF_X; in parse_elf_segs()
454 struct elf_seg *seg; in parse_vma_segs() local
517 seg = *segs + *seg_cnt; in parse_vma_segs()
520 seg->start = seg_start; in parse_vma_segs()
521 seg->end = seg_end; in parse_vma_segs()
522 seg->offset = seg_off; in parse_vma_segs()
523 seg->is_exec = true; in parse_vma_segs()
542 struct elf_seg *seg; in find_elf_seg() local
549 for (i = 0, seg = segs; i < seg_cnt; i++, seg++) { in find_elf_seg()
550 if (seg->start <= virtaddr && virtaddr < seg->end) in find_elf_seg()
551 return seg; in find_elf_seg()
558 struct elf_seg *seg; in find_vma_seg() local
565 for (i = 0, seg = segs; i < seg_cnt; i++, seg++) { in find_vma_seg()
566 if (seg->offset <= offset && offset < seg->offset + (seg->end - seg->start)) in find_vma_seg()
567 return seg; in find_vma_seg()
624 struct elf_seg *seg = NULL; in collect_usdt_targets() local
670 seg = find_elf_seg(segs, seg_cnt, usdt_abs_ip); in collect_usdt_targets()
671 if (!seg) { in collect_usdt_targets()
677 if (!seg->is_exec) { in collect_usdt_targets()
680 path, seg->start, seg->end, usdt_provider, usdt_name, in collect_usdt_targets()
685 usdt_rel_ip = usdt_abs_ip - seg->start + seg->offset; in collect_usdt_targets()
717 seg = find_vma_seg(vma_segs, vma_seg_cnt, usdt_rel_ip); in collect_usdt_targets()
718 if (!seg) { in collect_usdt_targets()
725 usdt_abs_ip = seg->start - seg->offset + usdt_rel_ip; in collect_usdt_targets()
731 seg ? seg->start : 0, seg ? seg->end : 0, seg ? seg->offset : 0); in collect_usdt_targets()
742 seg = find_elf_seg(segs, seg_cnt, note.sema_addr); in collect_usdt_targets()
743 if (!seg) { in collect_usdt_targets()
749 if (seg->is_exec) { in collect_usdt_targets()
752 path, seg->start, seg->end, usdt_provider, usdt_name, in collect_usdt_targets()
757 usdt_sema_off = note.sema_addr - seg->start + seg->offset; in collect_usdt_targets()
762 seg->start, seg->end, seg->offset); in collect_usdt_targets()