Lines Matching +full:end +full:- +full:point

1 // SPDX-License-Identifier: GPL-2.0
27 return ((struct ksym *)p1)->addr - ((struct ksym *)p2)->addr; in ksym_cmp()
42 return -ENOENT; in load_kallsyms_refresh()
50 return -EFBIG; in load_kallsyms_refresh()
75 int start = 0, end = sym_cnt; in ksym_search() local
82 while (start < end) { in ksym_search()
83 size_t mid = start + (end - start) / 2; in ksym_search()
85 result = key - syms[mid].addr; in ksym_search()
87 end = mid; in ksym_search()
94 if (start >= 1 && syms[start - 1].addr < key && in ksym_search()
97 return &syms[start - 1]; in ksym_search()
127 return -EINVAL; in kallsyms_find()
135 err = -ENOENT; in kallsyms_find()
157 sz = read(trace_fd, buf, sizeof(buf) - 1); in read_trace_pipe()
167 size_t start, end, base; in get_uprobe_offset() local
174 return -errno; in get_uprobe_offset()
176 while (fscanf(f, "%zx-%zx %s %zx %*[^\n]\n", &start, &end, buf, &base) == 4) { in get_uprobe_offset()
177 if (buf[2] == 'x' && (uintptr_t)addr >= start && (uintptr_t)addr < end) { in get_uprobe_offset()
186 return -ESRCH; in get_uprobe_offset()
197 * point. We need to use the local entry point when patching in get_uprobe_offset()
198 * functions, so identify and step over the global entry point in get_uprobe_offset()
201 * The global entry point sequence is always of the form: in get_uprobe_offset()
217 return (uintptr_t)(insn + 2) - start + base; in get_uprobe_offset()
220 return (uintptr_t)addr - start + base; in get_uprobe_offset()
225 size_t start, end, offset; in get_rel_offset() local
231 return -errno; in get_rel_offset()
233 while (fscanf(f, "%zx-%zx %s %zx %*[^\n]\n", &start, &end, buf, &offset) == 4) { in get_rel_offset()
234 if (addr >= start && addr < end) { in get_rel_offset()
236 return (size_t)addr - start + offset; in get_rel_offset()
241 return -EINVAL; in get_rel_offset()
252 if (nhdr->n_type == 3 && nhdr->n_namesz == sizeof("GNU") && in parse_build_id_buf()
253 !strcmp((char *)(nhdr + 1), "GNU") && nhdr->n_descsz > 0 && in parse_build_id_buf()
254 nhdr->n_descsz <= BPF_BUILD_ID_SIZE) { in parse_build_id_buf()
256 ALIGN(sizeof("GNU"), 4) + sizeof(Elf32_Nhdr), nhdr->n_descsz); in parse_build_id_buf()
257 memset(build_id + nhdr->n_descsz, 0, BPF_BUILD_ID_SIZE - nhdr->n_descsz); in parse_build_id_buf()
258 return (int) nhdr->n_descsz; in parse_build_id_buf()
262 ALIGN(nhdr->n_namesz, 4) + ALIGN(nhdr->n_descsz, 4); in parse_build_id_buf()
265 return -ENOENT; in parse_build_id_buf()
275 int fd, err = -EINVAL; in read_build_id()
281 return -EINVAL; in read_build_id()
285 return -errno; in read_build_id()
304 if (phdr->p_type != PT_NOTE) in read_build_id()
309 if (phdr->p_offset + phdr->p_memsz > max) in read_build_id()
311 err = parse_build_id_buf(data + phdr->p_offset, phdr->p_memsz, build_id); in read_build_id()