Lines Matching defs:sp
157 * the pointer to the start of the actual section data back into sp->cts_data.
160 ctf_sect_mmap(ctf_sect_t *sp, int fd)
162 size_t pageoff = sp->cts_offset & ~_PAGEMASK;
164 caddr_t base = mmap64(NULL, sp->cts_size + pageoff, PROT_READ,
165 MAP_PRIVATE, fd, sp->cts_offset & _PAGEMASK);
168 sp->cts_data = base + pageoff;
174 * Since sp->cts_data has the adjusted offset, we have to again round down
178 ctf_sect_munmap(const ctf_sect_t *sp)
180 uintptr_t addr = (uintptr_t)sp->cts_data;
183 (void) munmap((void *)(addr - pageoff), sp->cts_size + pageoff);
259 GElf_Shdr *sp;
311 if ((sp = malloc(nbytes)) == NULL)
325 free(sp);
330 shdr_to_gelf(&sp32[i], &sp[i]);
334 } else if (pread64(fd, sp, nbytes, hdr.e64.e_shoff) != nbytes) {
335 free(sp);
343 strs_mapsz = sp[shstrndx].sh_size +
344 (sp[shstrndx].sh_offset & ~_PAGEMASK);
347 fd, sp[shstrndx].sh_offset & _PAGEMASK);
350 (sp[shstrndx].sh_offset & ~_PAGEMASK);
353 free(sp);
362 const GElf_Shdr *shp = &sp[i];
363 const GElf_Shdr *lhp = &sp[shp->sh_link];
368 if (shp->sh_name >= sp[shstrndx].sh_size ||
369 lhp->sh_name >= sp[shstrndx].sh_size)
398 free(sp); /* free section header array */