Lines Matching refs:seg
4610 kernel_segment_command_t * seg = NULL;
4632 for (seg = firstsegfromheader(mh); seg != NULL; seg = nextsegfromheader(mh, seg)) {
4633 seg->vmaddr += vm_kernel_slide;
4637 seg->segname,
4638 (unsigned long)VM_KERNEL_UNSLIDE(seg->vmaddr),
4639 (unsigned long)seg->vmaddr);
4643 relocBase = (char *) seg->vmaddr;
4646 if (!strcmp(seg->segname, "__LINKEDIT")) {
4647 linkeditBase = (char *) seg->vmaddr - seg->fileoff;
4649 linkeditSeg = seg;
4651 for (sec = firstsect(seg); sec != NULL; sec = nextsect(seg, sec)) {
5380 kernel_segment_command_t * seg = NULL;
5405 seg = firstsegfromheader((kernel_mach_header_t *)kmod_info->address);
5406 while (seg) {
5407 start = round_page(seg->vmaddr);
5408 end = trunc_page(seg->vmaddr + seg->vmsize);
5410 result = OSKext_protect(kext_map, start, end, seg->maxprot, TRUE);
5417 getIdentifierCString(), seg->segname, (int)result);
5421 result = OSKext_protect(kext_map, start, end, seg->initprot, FALSE);
5428 getIdentifierCString(), seg->segname, (int)result);
5432 if (segmentShouldBeWired(seg)) {
5433 result = OSKext_wire(kext_map, start, end, seg->initprot, FALSE);
5439 seg = nextsegfromheader((kernel_mach_header_t *) kmod_info->address, seg);
5449 OSKext::segmentShouldBeWired(kernel_segment_command_t *seg)
5451 return (sKeepSymbols || strncmp(seg->segname, SEG_LINKEDIT, sizeof(seg->segname)));
5463 kernel_segment_command_t * seg = NULL;
5563 seg = firstsegfromheader((kernel_mach_header_t *)kmod_info->address);
5564 while (seg) {
5565 if (!verifySegmentMapping(seg)) {
5570 seg = nextsegfromheader((kernel_mach_header_t *) kmod_info->address, seg);
5583 OSKext::verifySegmentMapping(kernel_segment_command_t *seg)
5586 if (!segmentShouldBeWired(seg)) return true;
5588 for (address = seg->vmaddr;
5589 address < round_page(seg->vmaddr + seg->vmsize);
6034 kernel_segment_command_t *seg = NULL;
6053 seg = firstsegfromheader((kernel_mach_header_t *)kmod_info->address);
6054 while (seg) {
6055 if (segmentShouldBeWired(seg)) {
6056 result = vm_map_unwire(kext_map, seg->vmaddr,
6057 seg->vmaddr + seg->vmsize, FALSE);
6069 seg = nextsegfromheader((kernel_mach_header_t *) kmod_info->address, seg);