• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/dyld-353.2.1/src/

Lines Matching refs:segIndex

106 	for (uint32_t i = 0, segIndex=0; i < cmd_count; ++i) {
112 segOffsets[segIndex++] = (uint32_t)((uint8_t*)segCmd - fMachOData);
511 const macho_segment_command* ImageLoaderMachO::segLoadCommand(unsigned int segIndex) const
514 uint32_t lcOffset = lcOffsets[segIndex];
518 const char* ImageLoaderMachO::segName(unsigned int segIndex) const
520 return segLoadCommand(segIndex)->segname;
524 uintptr_t ImageLoaderMachO::segSize(unsigned int segIndex) const
526 return segLoadCommand(segIndex)->vmsize;
530 uintptr_t ImageLoaderMachO::segFileSize(unsigned int segIndex) const
532 return segLoadCommand(segIndex)->filesize;
536 bool ImageLoaderMachO::segHasTrailingZeroFill(unsigned int segIndex)
538 return ( segWriteable(segIndex) && (segSize(segIndex) > segFileSize(segIndex)) );
542 uintptr_t ImageLoaderMachO::segFileOffset(unsigned int segIndex) const
544 return segLoadCommand(segIndex)->fileoff;
548 bool ImageLoaderMachO::segReadable(unsigned int segIndex) const
550 return ( (segLoadCommand(segIndex)->initprot & VM_PROT_READ) != 0);
554 bool ImageLoaderMachO::segWriteable(unsigned int segIndex) const
556 return ( (segLoadCommand(segIndex)->initprot & VM_PROT_WRITE) != 0);
560 bool ImageLoaderMachO::segExecutable(unsigned int segIndex) const
562 return ( (segLoadCommand(segIndex)->initprot & VM_PROT_EXECUTE) != 0);
566 bool ImageLoaderMachO::segUnaccessible(unsigned int segIndex) const
568 return (segLoadCommand(segIndex)->initprot == 0);
571 bool ImageLoaderMachO::segHasPreferredLoadAddress(unsigned int segIndex) const
573 return (segLoadCommand(segIndex)->vmaddr != 0);
576 uintptr_t ImageLoaderMachO::segPreferredLoadAddress(unsigned int segIndex) const
578 return segLoadCommand(segIndex)->vmaddr;
581 uintptr_t ImageLoaderMachO::segActualLoadAddress(unsigned int segIndex) const
583 return segLoadCommand(segIndex)->vmaddr + fSlide;
587 uintptr_t ImageLoaderMachO::segActualEndAddress(unsigned int segIndex) const
589 return segActualLoadAddress(segIndex) + segSize(segIndex);
592 bool ImageLoaderMachO::segHasRebaseFixUps(unsigned int segIndex) const
596 const macho_segment_command* segCmd = segLoadCommand(segIndex);
607 bool ImageLoaderMachO::segHasBindFixUps(unsigned int segIndex) const
611 const macho_segment_command* segCmd = segLoadCommand(segIndex);
623 bool ImageLoaderMachO::segIsReadOnlyImport(unsigned int segIndex) const
625 const macho_segment_command* segCmd = segLoadCommand(segIndex);
1995 void ImageLoaderMachO::segProtect(unsigned int segIndex, const ImageLoader::LinkContext& context)
1998 if ( !segUnaccessible(segIndex) ) {
1999 if ( segExecutable(segIndex) )
2001 if ( segReadable(segIndex) )
2003 if ( segWriteable(segIndex) )
2006 vm_address_t addr = segActualLoadAddress(segIndex);
2007 vm_size_t size = segSize(segIndex);
2012 (long long)addr, (long long)size, protection, r, segName(segIndex), this->getPath());
2015 dyld::log("%18s at 0x%08lX->0x%08lX altered permissions to %c%c%c\n", segName(segIndex), (uintptr_t)addr, (uintptr_t)addr+size-1,
2020 void ImageLoaderMachO::segMakeWritable(unsigned int segIndex, const ImageLoader::LinkContext& context)
2022 vm_address_t addr = segActualLoadAddress(segIndex);
2023 vm_size_t size = segSize(segIndex);
2026 if ( segExecutable(segIndex) && !segHasRebaseFixUps(segIndex) )
2031 (long long)addr, (long long)size, protection, r, segName(segIndex), this->getPath());
2034 dyld::log("%18s at 0x%08lX->0x%08lX altered permissions to %c%c%c\n", segName(segIndex), (uintptr_t)addr, (uintptr_t)addr+size-1,