Lines Matching +refs:make +refs:config +refs:header

72   MachHeaderSection *header = nullptr;  member in __anoneb56ad3f0111::Writer
285 if (config->entry->isInStubs()) in writeTo()
287 in.stubs->fileOff + config->entry->stubsIndex * target->stubSize; in writeTo()
289 c->entryoff = config->entry->getVA() - in.header->addr; in writeTo()
557 c->cryptoff = in.header->getSize(); in writeTo()
620 if (config->entry) in treatSpecialUndefineds()
621 if (auto *undefined = dyn_cast<Undefined>(config->entry)) in treatSpecialUndefineds()
626 for (const Symbol *sym : config->explicitUndefineds) { in treatSpecialUndefineds()
633 config->exportedSymbols.literals) { in treatSpecialUndefineds()
644 if (config->emitInitOffsets && in prepareSymbolRelocation()
711 if (config->emitChainedFixups) in scanRelocations()
724 if (config->emitChainedFixups) in addNonWeakDefinition()
752 if (config->deadStrip) { in scanSymbols()
796 in.header->addLoadCommand(make<LCSegment<LP>>(seg->name, seg)); in createLoadCommands()
800 if (config->emitChainedFixups) { in createLoadCommands()
801 in.header->addLoadCommand(make<LCChainedFixups>(in.chainedFixups)); in createLoadCommands()
802 in.header->addLoadCommand(make<LCExportsTrie>(in.exports)); in createLoadCommands()
804 in.header->addLoadCommand(make<LCDyldInfo>( in createLoadCommands()
807 in.header->addLoadCommand(make<LCSymtab>(symtabSection, stringTableSection)); in createLoadCommands()
808 in.header->addLoadCommand( in createLoadCommands()
809 make<LCDysymtab>(symtabSection, indirectSymtabSection)); in createLoadCommands()
810 if (!config->umbrella.empty()) in createLoadCommands()
811 in.header->addLoadCommand(make<LCSubFramework>(config->umbrella)); in createLoadCommands()
812 if (config->emitEncryptionInfo) in createLoadCommands()
813 in.header->addLoadCommand(make<LCEncryptionInfo<LP>>()); in createLoadCommands()
814 for (StringRef path : config->runtimePaths) in createLoadCommands()
815 in.header->addLoadCommand(make<LCRPath>(path)); in createLoadCommands()
817 switch (config->outputType) { in createLoadCommands()
819 in.header->addLoadCommand(make<LCLoadDylinker>()); in createLoadCommands()
822 in.header->addLoadCommand(make<LCDylib>(LC_ID_DYLIB, config->installName, in createLoadCommands()
823 config->dylibCompatibilityVersion, in createLoadCommands()
824 config->dylibCurrentVersion)); in createLoadCommands()
832 if (config->generateUuid) { in createLoadCommands()
833 uuidCommand = make<LCUuid>(); in createLoadCommands()
834 in.header->addLoadCommand(uuidCommand); in createLoadCommands()
837 if (useLCBuildVersion(config->platformInfo)) in createLoadCommands()
838 in.header->addLoadCommand(make<LCBuildVersion>(config->platformInfo)); in createLoadCommands()
840 in.header->addLoadCommand(make<LCMinVersion>(config->platformInfo)); in createLoadCommands()
842 if (config->secondaryPlatformInfo) { in createLoadCommands()
843 in.header->addLoadCommand( in createLoadCommands()
844 make<LCBuildVersion>(*config->secondaryPlatformInfo)); in createLoadCommands()
848 if (config->outputType == MH_EXECUTE) in createLoadCommands()
849 in.header->addLoadCommand(make<LCMain>()); in createLoadCommands()
884 config->deadStripDylibs)) in createLoadCommands()
918 in.header->addLoadCommand(make<LCDylib>(lcType, dylibFile->installName, in createLoadCommands()
923 in.header->addLoadCommand( in createLoadCommands()
924 make<LCDylib>(LC_REEXPORT_DYLIB, dylibFile->installName)); in createLoadCommands()
927 for (const auto &dyldEnv : config->dyldEnvs) in createLoadCommands()
928 in.header->addLoadCommand(make<LCDyldEnv>(dyldEnv)); in createLoadCommands()
931 in.header->addLoadCommand(make<LCFunctionStarts>(functionStartsSection)); in createLoadCommands()
933 in.header->addLoadCommand(make<LCDataInCode>(dataInCodeSection)); in createLoadCommands()
935 in.header->addLoadCommand(make<LCCodeSignature>(codeSignatureSection)); in createLoadCommands()
938 config->headerPad = std::max( in createLoadCommands()
939 config->headerPad, (config->headerPadMaxInstallNames in createLoadCommands()
995 stringTableSection = make<StringTableSection>(); in createOutputSections()
997 indirectSymtabSection = make<IndirectSymtabSection>(); in createOutputSections()
998 if (config->adhocCodesign) in createOutputSections()
999 codeSignatureSection = make<CodeSignatureSection>(); in createOutputSections()
1000 if (config->emitDataInCodeInfo) in createOutputSections()
1001 dataInCodeSection = make<DataInCodeSection>(); in createOutputSections()
1002 if (config->emitFunctionStarts) in createOutputSections()
1003 functionStartsSection = make<FunctionStartsSection>(); in createOutputSections()
1005 switch (config->outputType) { in createOutputSections()
1007 make<PageZeroSection>(); in createOutputSections()
1159 FileOutputBuffer::create(config->outputFile, fileOff, in openFile()
1163 fatal("failed to open " + config->outputFile + ": " + in openFile()
1183 if (config->arch() != AK_arm64 || config->ignoreOptimizationHints) in applyOptimizationHints()
1209 hashes[chunks.size()] = xxh3_64bits(sys::path::filename(config->finalOutput)); in writeUuid()
1219 if (!config->emitChainedFixups) in buildFixupChains()
1279 if (config->generateUuid) in writeOutputFile()
1290 if (config->entry && needsBinding(config->entry)) in run()
1291 in.stubs->addEntry(config->entry); in run()
1331 if (LLVM_ENABLE_THREADS && config->timeTraceEnabled) in run()
1332 timeTraceProfilerInitialize(config->timeTraceGranularity, "writeMapFile"); in run()
1334 if (LLVM_ENABLE_THREADS && config->timeTraceEnabled) in run()
1348 in.header = make<MachHeaderSection>(); in createSyntheticSections()
1349 if (config->dedupStrings) in createSyntheticSections()
1351 make<DeduplicatedCStringSection>(section_names::cString); in createSyntheticSections()
1353 in.cStringSection = make<CStringSection>(section_names::cString); in createSyntheticSections()
1355 make<DeduplicatedCStringSection>(section_names::objcMethname); in createSyntheticSections()
1356 in.wordLiteralSection = make<WordLiteralSection>(); in createSyntheticSections()
1357 if (config->emitChainedFixups) { in createSyntheticSections()
1358 in.chainedFixups = make<ChainedFixupsSection>(); in createSyntheticSections()
1360 in.rebase = make<RebaseSection>(); in createSyntheticSections()
1361 in.binding = make<BindingSection>(); in createSyntheticSections()
1362 in.weakBinding = make<WeakBindingSection>(); in createSyntheticSections()
1363 in.lazyBinding = make<LazyBindingSection>(); in createSyntheticSections()
1364 in.lazyPointers = make<LazyPointerSection>(); in createSyntheticSections()
1365 in.stubHelper = make<StubHelperSection>(); in createSyntheticSections()
1367 in.exports = make<ExportSection>(); in createSyntheticSections()
1368 in.got = make<GotSection>(); in createSyntheticSections()
1369 in.tlvPointers = make<TlvPointerSection>(); in createSyntheticSections()
1370 in.stubs = make<StubsSection>(); in createSyntheticSections()
1371 in.objcStubs = make<ObjCStubsSection>(); in createSyntheticSections()
1373 in.objCImageInfo = make<ObjCImageInfoSection>(); in createSyntheticSections()
1374 in.initOffsets = make<InitOffsetsSection>(); in createSyntheticSections()
1375 in.objcMethList = make<ObjCMethListSection>(); in createSyntheticSections()