• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/kern/

Lines Matching refs:sgp

67 	struct segment_command	*sgp;
72 sgp = (struct segment_command *)
75 if ( sgp->cmd == LC_SEGMENT) {
76 if (sgp->vmaddr + sgp->vmsize > last_addr)
77 last_addr = sgp->vmaddr + sgp->vmsize;
79 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
167 struct segment_command *sgp;
171 sgp = (struct segment_command *)
174 if(sgp->cmd == LC_SEGMENT)
175 if(strncmp(sgp->segname, segname, sizeof(sgp->segname)) == 0 ||
177 sp = (struct section *)((char *)sgp +
179 for(j = 0; j < sgp->nsects; j++){
189 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
202 struct segment_command *sgp;
205 sgp = (struct segment_command *)
208 if ( sgp->cmd == LC_SEGMENT
209 && !strncmp(sgp->segname, seg_name, sizeof(sgp->segname)))
210 return sgp;
211 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
279 struct segment_command *sgp;
282 sgp = (struct segment_command *)
285 if (sgp->cmd == LC_SEGMENT)
286 return sgp;
287 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
299 nextseg(struct segment_command *sgp)
303 this = nextsegfromheader(&_mh_execute_header, sgp);
309 if (!this && sgp != fvm_seg)
325 struct segment_command *sgp;
328 sgp = (struct segment_command *)
331 if (sgp == seg)
333 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
339 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
341 if (sgp->cmd == LC_SEGMENT)
342 return sgp;
343 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
393 firstsect(struct segment_command *sgp)
395 if (!sgp || sgp->nsects == 0)
398 return (struct section *)(sgp+1);
408 nextsect(struct segment_command *sgp, struct section *sp)
410 struct section *fsp = firstsect(sgp);
412 if (((unsigned long)(sp - fsp) + 1) >= sgp->nsects)
447 struct segment_command *sgp = getsegbyname("__USER");
451 if (sgp)
452 return sgp;
458 sgp = fvm_seg;
461 sgp->vmaddr = fvp->header_addr;
462 sgp->vmsize = getsizeofmacho((struct mach_header *)(sgp->vmaddr));
465 sp->addr = sgp->vmaddr;
466 sp->size = sgp->vmsize;
473 return sgp;
485 struct segment_command *sgp;
489 for ( sgp = firstsegfromheader(header)
490 ; sgp
491 ; sgp = nextsegfromheader(header, sgp))
493 if (sgp->fileoff + sgp->filesize > last_addr)
494 last_addr = sgp->fileoff + sgp->filesize;