• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/osfmk/mach-o/

Lines Matching refs:sgp

70 	struct segment_command	*sgp;
75 sgp = (struct segment_command *)
78 if ( sgp->cmd == LC_SEGMENT) {
79 if (sgp->vmaddr + sgp->vmsize > last_addr)
80 last_addr = sgp->vmaddr + sgp->vmsize;
82 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
181 struct segment_command *sgp;
185 sgp = (struct segment_command *)
188 if(sgp->cmd == LC_SEGMENT)
189 if(strncmp(sgp->segname, segname, sizeof(sgp->segname)) == 0 ||
191 sp = (struct section *)((char *)sgp +
193 for(j = 0; j < sgp->nsects; j++){
203 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
219 struct segment_command *sgp;
222 sgp = (struct segment_command *)
225 if ( sgp->cmd == LC_SEGMENT
226 && !strncmp(sgp->segname, seg_name, sizeof(sgp->segname)))
227 return sgp;
228 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
298 struct segment_command *sgp;
301 sgp = (struct segment_command *)
304 if (sgp->cmd == LC_SEGMENT)
305 return sgp;
306 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
321 nextseg(struct segment_command *sgp)
325 this = nextsegfromheader(&_mh_execute_header, sgp);
331 if (!this && sgp != fvm_seg)
350 struct segment_command *sgp;
353 sgp = (struct segment_command *)
356 if (sgp == seg)
358 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
364 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
366 if (sgp->cmd == LC_SEGMENT)
367 return sgp;
368 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);
427 firstsect(struct segment_command *sgp)
429 if (!sgp || sgp->nsects == 0)
432 return (struct section *)(sgp+1);
445 nextsect(struct segment_command *sgp, struct section *sp)
447 struct section *fsp = firstsect(sgp);
449 if (((unsigned long)(sp - fsp) + 1) >= sgp->nsects)
487 struct segment_command *sgp = getsegbyname("__USER");
491 if (sgp)
492 return sgp;
498 sgp = fvm_seg;
501 sgp->vmaddr = fvp->header_addr;
502 sgp->vmsize = getsizeofmacho((struct mach_header *)(sgp->vmaddr));
505 sp->addr = sgp->vmaddr;
506 sp->size = sgp->vmsize;
512 return sgp;
524 struct segment_command *sgp;
528 for ( sgp = firstsegfromheader(header)
529 ; sgp
530 ; sgp = nextsegfromheader(header, sgp))
532 if (sgp->fileoff + sgp->filesize > last_addr)
533 last_addr = sgp->fileoff + sgp->filesize;
549 struct segment_command *sgp;
552 sgp = (struct segment_command *)
555 if(sgp->cmd == LC_SYMTAB)
556 return((struct symtab_command *)sgp);
557 sgp = (struct segment_command *)((char *)sgp + sgp->cmdsize);