Lines Matching refs:MachO
133 Flags |= MachO::MH_SUBSECTIONS_VIA_SYMBOLS; in WriteHeader()
141 Write32(is64Bit() ? MachO::MH_MAGIC_64 : MachO::MH_MAGIC); in WriteHeader()
146 Write32(MachO::MH_OBJECT); in WriteHeader()
154 (is64Bit()?sizeof(MachO::mach_header_64): sizeof(MachO::mach_header))); in WriteHeader()
172 is64Bit() ? sizeof(MachO::segment_command_64): in WriteSegmentLoadCommand()
173 sizeof(MachO::segment_command); in WriteSegmentLoadCommand()
174 Write32(is64Bit() ? MachO::LC_SEGMENT_64 : MachO::LC_SEGMENT); in WriteSegmentLoadCommand()
176 NumSections * (is64Bit() ? sizeof(MachO::section_64) : in WriteSegmentLoadCommand()
177 sizeof(MachO::section))); in WriteSegmentLoadCommand()
192 Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE); in WriteSegmentLoadCommand()
194 Write32(MachO::VM_PROT_READ | MachO::VM_PROT_WRITE | MachO::VM_PROT_EXECUTE); in WriteSegmentLoadCommand()
235 Flags |= MachO::S_ATTR_SOME_INSTRUCTIONS; in WriteSection()
247 assert(OS.tell() - Start == (is64Bit() ? sizeof(MachO::section_64) : in WriteSection()
248 sizeof(MachO::section))); in WriteSection()
260 Write32(MachO::LC_SYMTAB); in WriteSymtabLoadCommand()
261 Write32(sizeof(MachO::symtab_command)); in WriteSymtabLoadCommand()
267 assert(OS.tell() - Start == sizeof(MachO::symtab_command)); in WriteSymtabLoadCommand()
283 Write32(MachO::LC_DYSYMTAB); in WriteDysymtabLoadCommand()
284 Write32(sizeof(MachO::dysymtab_command)); in WriteDysymtabLoadCommand()
304 assert(OS.tell() - Start == sizeof(MachO::dysymtab_command)); in WriteDysymtabLoadCommand()
347 Type = MachO::N_INDR; in WriteNlist()
349 Type = MachO::N_UNDF; in WriteNlist()
351 Type = MachO::N_ABS; in WriteNlist()
353 Type = MachO::N_SECT; in WriteNlist()
358 Type |= MachO::N_PEXT; in WriteNlist()
362 Type |= MachO::N_EXT; in WriteNlist()
412 Write32(sizeof(MachO::linkedit_data_command)); in WriteLinkeditLoadCommand()
416 assert(OS.tell() - Start == sizeof(MachO::linkedit_data_command)); in WriteLinkeditLoadCommand()
422 unsigned Size = sizeof(MachO::linker_option_command); in ComputeLinkerOptionsLoadCommandSize()
435 Write32(MachO::LC_LINKER_OPTION); in WriteLinkerOptionsLoadCommand()
438 uint64_t BytesWritten = sizeof(MachO::linker_option_command); in WriteLinkerOptionsLoadCommand()
476 if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS && in BindIndirectSymbols()
477 Section.getType() != MachO::S_LAZY_SYMBOL_POINTERS && in BindIndirectSymbols()
478 Section.getType() != MachO::S_SYMBOL_STUBS) { in BindIndirectSymbols()
492 if (Section.getType() != MachO::S_NON_LAZY_SYMBOL_POINTERS) in BindIndirectSymbols()
508 if (Section.getType() != MachO::S_LAZY_SYMBOL_POINTERS && in BindIndirectSymbols()
509 Section.getType() != MachO::S_SYMBOL_STUBS) in BindIndirectSymbols()
546 StringTable.finalize(StringTableBuilder::MachO); in ComputeSymbolTable()
754 sizeof(MachO::segment_command_64) + NumSections * sizeof(MachO::section_64): in WriteObject()
755 sizeof(MachO::segment_command) + NumSections * sizeof(MachO::section); in WriteObject()
760 LoadCommandsSize += sizeof(MachO::version_min_command); in WriteObject()
767 LoadCommandsSize += sizeof(MachO::linkedit_data_command); in WriteObject()
775 LoadCommandsSize += sizeof(MachO::linkedit_data_command); in WriteObject()
783 LoadCommandsSize += (sizeof(MachO::symtab_command) + in WriteObject()
784 sizeof(MachO::dysymtab_command)); in WriteObject()
798 uint64_t SectionDataStart = (is64Bit() ? sizeof(MachO::mach_header_64) : in WriteObject()
799 sizeof(MachO::mach_header)) + LoadCommandsSize; in WriteObject()
840 RelocTableEnd += NumRelocs * sizeof(MachO::any_relocation_info); in WriteObject()
850 Write32(VersionInfo.Kind == MCVM_OSXVersionMin ? MachO::LC_VERSION_MIN_MACOSX : in WriteObject()
851 MachO::LC_VERSION_MIN_IPHONEOS); in WriteObject()
852 Write32(sizeof(MachO::version_min_command)); in WriteObject()
862 WriteLinkeditLoadCommand(MachO::LC_DATA_IN_CODE, DataRegionsOffset, in WriteObject()
869 WriteLinkeditLoadCommand(MachO::LC_LINKER_OPTIMIZATION_HINT, in WriteObject()
896 sizeof(MachO::nlist_64) : in WriteObject()
897 sizeof(MachO::nlist)); in WriteObject()
979 if (Section.getType() == MachO::S_NON_LAZY_SYMBOL_POINTERS) { in WriteObject()
983 uint32_t Flags = MachO::INDIRECT_SYMBOL_LOCAL; in WriteObject()
985 Flags |= MachO::INDIRECT_SYMBOL_ABS; in WriteObject()