Lines Matching defs:config

72 Configuration *config;
97 config = make<Configuration>();
109 config->progName = args[0];
197 if (config->formatBinary) {
242 if (config->isStatic || config->relocatable) {
296 if (config->emachine == EM_MIPS && config->gnuHash)
299 if (config->fixCortexA53Errata843419 && config->emachine != EM_AARCH64)
302 if (config->fixCortexA8 && config->emachine != EM_ARM)
305 if (config->tocOptimize && config->emachine != EM_PPC64)
308 if (config->pie && config->shared)
311 if (!config->shared && !config->filterList.empty())
314 if (!config->shared && !config->auxiliaryList.empty())
317 if (!config->relocatable && !config->defineCommon)
320 if (config->strip == StripPolicy::All && config->emitRelocs)
323 if (config->zText && config->zIfuncNoplt)
326 if (config->relocatable) {
327 if (config->shared)
329 if (config->gcSections)
331 if (config->gdbIndex)
333 if (config->icf != ICFLevel::None)
335 if (config->pie)
337 if (config->exportDynamic)
341 if (config->executeOnly) {
342 if (config->emachine != EM_AARCH64)
345 if (config->singleRoRx && !script->hasSectionsCommand)
349 if (config->zRetpolineplt && config->zForceIbt)
352 if (config->emachine != EM_AARCH64) {
353 if (config->pacPlt)
355 if (config->forceBTI)
506 switch (config->ekind) {
562 if (config->shared)
609 config->noDynamicLinker = true;
739 if (config->warnSymbolOrdering)
762 config->callGraphProfile[std::make_pair(from, to)] += count;
779 config->callGraphProfile[{from, to}] += cgpe.cgp_weight;
818 if (!names.insert(s) && config->warnSymbolOrdering)
828 const char *argv[] = {config->progName.data(), opt.data()};
844 config->allowMultipleDefinition =
848 config->allowShlibUndefined =
851 config->auxiliaryList = args::getStrings(args, OPT_auxiliary);
852 config->bsymbolic = args.hasArg(OPT_Bsymbolic);
853 config->bsymbolicFunctions = args.hasArg(OPT_Bsymbolic_functions);
854 config->checkSections =
856 config->chroot = args.getLastArgValue(OPT_chroot);
857 config->compressDebugSections = getCompressDebugSections(args);
858 config->cref = args.hasFlag(OPT_cref, OPT_no_cref, false);
859 config->defineCommon = args.hasFlag(OPT_define_common, OPT_no_define_common,
861 config->demangle = args.hasFlag(OPT_demangle, OPT_no_demangle, true);
862 config->dependentLibraries = args.hasFlag(OPT_dependent_libraries, OPT_no_dependent_libraries, true);
863 config->disableVerify = args.hasArg(OPT_disable_verify);
864 config->discard = getDiscard(args);
865 config->dwoDir = args.getLastArgValue(OPT_plugin_opt_dwo_dir_eq);
866 config->dynamicLinker = getDynamicLinker(args);
867 config->ehFrameHdr =
869 config->emitLLVM = args.hasArg(OPT_plugin_opt_emit_llvm, false);
870 config->emitRelocs = args.hasArg(OPT_emit_relocs);
871 config->callGraphProfileSort = args.hasFlag(
873 config->enableNewDtags =
875 config->entry = args.getLastArgValue(OPT_entry);
876 config->executeOnly =
878 config->exportDynamic =
880 config->filterList = args::getStrings(args, OPT_filter);
881 config->fini = args.getLastArgValue(OPT_fini, "_fini");
882 config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419);
883 config->fixCortexA8 = args.hasArg(OPT_fix_cortex_a8);
884 config->forceBTI = hasZOption(args, "force-bti");
885 config->gcSections = args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false);
886 config->gnuUnique = args.hasFlag(OPT_gnu_unique, OPT_no_gnu_unique, true);
887 config->gdbIndex = args.hasFlag(OPT_gdb_index, OPT_no_gdb_index, false);
888 config->icf = getICF(args);
889 config->ignoreDataAddressEquality =
891 config->ignoreFunctionAddressEquality =
893 config->init = args.getLastArgValue(OPT_init, "_init");
894 config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline);
895 config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate);
896 config->ltoCSProfileFile = args.getLastArgValue(OPT_lto_cs_profile_file);
897 config->ltoDebugPassManager = args.hasArg(OPT_lto_debug_pass_manager);
898 config->ltoNewPassManager = args.hasArg(OPT_lto_new_pass_manager);
899 config->ltoNewPmPasses = args.getLastArgValue(OPT_lto_newpm_passes);
900 config->ltoo = args::getInteger(args, OPT_lto_O, 2);
901 config->ltoObjPath = args.getLastArgValue(OPT_lto_obj_path_eq);
902 config->ltoPartitions = args::getInteger(args, OPT_lto_partitions, 1);
903 config->ltoSampleProfile = args.getLastArgValue(OPT_lto_sample_profile);
904 config->mapFile = args.getLastArgValue(OPT_Map);
905 config->mipsGotSize = args::getInteger(args, OPT_mips_got_size, 0xfff0);
906 config->mergeArmExidx =
908 config->mmapOutputFile =
910 config->nmagic = args.hasFlag(OPT_nmagic, OPT_no_nmagic, false);
911 config->noinhibitExec = args.hasArg(OPT_noinhibit_exec);
912 config->nostdlib = args.hasArg(OPT_nostdlib);
913 config->oFormatBinary = isOutputFormatBinary(args);
914 config->omagic = args.hasFlag(OPT_omagic, OPT_no_omagic, false);
915 config->optRemarksFilename = args.getLastArgValue(OPT_opt_remarks_filename);
916 config->optRemarksPasses = args.getLastArgValue(OPT_opt_remarks_passes);
917 config->optRemarksWithHotness = args.hasArg(OPT_opt_remarks_with_hotness);
918 config->optRemarksFormat = args.getLastArgValue(OPT_opt_remarks_format);
919 config->optimize = args::getInteger(args, OPT_O, 1);
920 config->orphanHandling = getOrphanHandling(args);
921 config->outputFile = args.getLastArgValue(OPT_o);
922 config->pacPlt = hasZOption(args, "pac-plt");
923 config->pie = args.hasFlag(OPT_pie, OPT_no_pie, false);
924 config->printIcfSections =
926 config->printGcSections =
928 config->printSymbolOrder =
930 config->rpath = getRpath(args);
931 config->relocatable = args.hasArg(OPT_relocatable);
932 config->saveTemps = args.hasArg(OPT_save_temps);
933 config->searchPaths = args::getStrings(args, OPT_library_path);
934 config->sectionStartMap = getSectionStartMap(args);
935 config->shared = args.hasArg(OPT_shared);
936 config->singleRoRx = args.hasArg(OPT_no_rosegment);
937 config->soName = args.getLastArgValue(OPT_soname);
938 config->sortSection = getSortSection(args);
939 config->splitStackAdjustSize = args::getInteger(args, OPT_split_stack_adjust_size, 16384);
940 config->strip = getStrip(args);
941 config->sysroot = args.getLastArgValue(OPT_sysroot);
942 config->target1Rel = args.hasFlag(OPT_target1_rel, OPT_target1_abs, false);
943 config->target2 = getTarget2(args);
944 config->thinLTOCacheDir = args.getLastArgValue(OPT_thinlto_cache_dir);
945 config->thinLTOCachePolicy = CHECK(
948 config->thinLTOEmitImportsFiles = args.hasArg(OPT_thinlto_emit_imports_files);
949 config->thinLTOIndexOnly = args.hasArg(OPT_thinlto_index_only) ||
951 config->thinLTOIndexOnlyArg = args.getLastArgValue(OPT_thinlto_index_only_eq);
952 config->thinLTOJobs = args::getInteger(args, OPT_thinlto_jobs, -1u);
953 config->thinLTOObjectSuffixReplace =
955 config->thinLTOPrefixReplace =
957 config->trace = args.hasArg(OPT_trace);
958 config->undefined = args::getStrings(args, OPT_undefined);
959 config->undefinedVersion =
961 config->useAndroidRelrTags = args.hasFlag(
963 config->unresolvedSymbols = getUnresolvedSymbolPolicy(args);
964 config->warnBackrefs =
966 config->warnCommon = args.hasFlag(OPT_warn_common, OPT_no_warn_common, false);
967 config->warnIfuncTextrel =
969 config->warnSymbolOrdering =
971 config->zCombreloc = getZFlag(args, "combreloc", "nocombreloc", true);
972 config->zCopyreloc = getZFlag(args, "copyreloc", "nocopyreloc", true);
973 config->zForceIbt = hasZOption(args, "force-ibt");
974 config->zGlobal = hasZOption(args, "global");
975 config->zGnustack = getZGnuStack(args);
976 config->zHazardplt = hasZOption(args, "hazardplt");
977 config->zIfuncNoplt = hasZOption(args, "ifunc-noplt");
978 config->zInitfirst = hasZOption(args, "initfirst");
979 config->zInterpose = hasZOption(args, "interpose");
980 config->zKeepTextSectionPrefix = getZFlag(
982 config->zNodefaultlib = hasZOption(args, "nodefaultlib");
983 config->zNodelete = hasZOption(args, "nodelete");
984 config->zNodlopen = hasZOption(args, "nodlopen");
985 config->zNow = getZFlag(args, "now", "lazy", false);
986 config->zOrigin = hasZOption(args, "origin");
987 config->zRelro = getZFlag(args, "relro", "norelro", true);
988 config->zRetpolineplt = hasZOption(args, "retpolineplt");
989 config->zRodynamic = hasZOption(args, "rodynamic");
990 config->zSeparate = getZSeparate(args);
991 config->zShstk = hasZOption(args, "shstk");
992 config->zStackSize = args::getZOptionValue(args, OPT_z, "stack-size", 0);
993 config->zText = getZFlag(args, "text", "notext", true);
994 config->zWxneeded = hasZOption(args, "wxneeded");
1008 if (config->ltoo > 3)
1009 error("invalid optimization level for LTO: " + Twine(config->ltoo));
1010 if (config->ltoPartitions == 0)
1012 if (config->thinLTOJobs == 0)
1015 if (config->splitStackAdjustSize < 0)
1029 std::tie(config->ekind, config->emachine, config->osabi) =
1031 config->mipsN32Abi =
1033 config->emulation = s;
1040 config->sysvHash = true;
1042 config->gnuHash = true;
1044 config->sysvHash = config->gnuHash = true;
1050 config->mapFile = "-";
1055 if (config->nmagic || config->omagic)
1056 config->zRelro = false;
1058 std::tie(config->buildId, config->buildIdVector) = getBuildId(args);
1060 std::tie(config->androidPackDynRelocs, config->relrPackDynRelocs) =
1068 config->symbolOrderingFile = getSymbolOrderingFile(*buffer);
1071 config->callGraphProfileSort = false;
1075 assert(config->versionDefinitions.empty());
1076 config->versionDefinitions.push_back({"local", (uint16_t)VER_NDX_LOCAL, {}});
1077 config->versionDefinitions.push_back(
1083 config->versionDefinitions[VER_NDX_LOCAL].patterns.push_back(
1087 config->versionDefinitions[VER_NDX_GLOBAL].patterns.push_back(
1094 if (!config->exportDynamic) {
1100 config->dynamicList.push_back(
1109 config->undefined.push_back(arg->getValue());
1125 ELFKind k = config->ekind;
1126 uint16_t m = config->emachine;
1128 config->copyRelocs = (config->relocatable || config->emitRelocs);
1129 config->is64 = (k == ELF64LEKind || k == ELF64BEKind);
1130 config->isLE = (k == ELF32LEKind || k == ELF64LEKind);
1131 config->endianness = config->isLE ? endianness::little : endianness::big;
1132 config->isMips64EL = (k == ELF64LEKind && m == EM_MIPS);
1133 config->isPic = config->pie || config->shared;
1134 config->picThunk = args.hasArg(OPT_pic_veneer, config->isPic);
1135 config->wordsize = config->is64 ? 8 : 4;
1150 config->isRela = m == EM_AARCH64 || m == EM_AMDGPU || m == EM_HEXAGON ||
1159 config->writeAddends = args.hasFlag(OPT_apply_dynamic_relocs,
1161 !config->isRela;
1163 config->tocOptimize =
1210 config->asNeeded = true;
1213 config->formatBinary = isFormatBinary(arg->getValue());
1216 config->asNeeded = false;
1221 config->isStatic = true;
1224 config->isStatic = false;
1265 stack.emplace_back(config->asNeeded, config->isStatic, inWholeArchive);
1272 std::tie(config->asNeeded, config->isStatic, inWholeArchive) = stack.back();
1284 if (config->ekind != ELFNoneKind)
1290 config->ekind = f->ekind;
1291 config->emachine = f->emachine;
1292 config->osabi = f->osabi;
1293 config->mipsN32Abi = config->emachine == EM_MIPS && isMipsN32Abi(f);
1306 if (config->nmagic || config->omagic) {
1321 if (config->nmagic || config->omagic) {
1327 if (val > config->maxPageSize)
1328 val = config->maxPageSize;
1346 if ((v % config->maxPageSize) != 0)
1484 if (config->icf == ICFLevel::Safe || !(d->section->flags & SHF_EXECINSTR))
1505 if (config->icf == ICFLevel::All && config->ignoreDataAddressEquality)
1572 if (!config->sectionStartMap.empty())
1575 if (config->emachine == EM_MIPS)
1699 if (config->emachine != EM_386 && config->emachine != EM_X86_64 &&
1700 config->emachine != EM_AARCH64)
1706 if (config->forceBTI && !(features & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) {
1709 } else if (config->zForceIbt &&
1720 if (config->pacPlt)
1723 if (config->zShstk)
1735 if (config->emachine == EM_MIPS)
1736 config->sysvHash = true;
1738 config->sysvHash = config->gnuHash = true;
1742 if (config->outputFile.empty())
1743 config->outputFile = "a.out";
1748 if (auto e = tryCreateFile(config->outputFile))
1749 error("cannot open output file " + config->outputFile + ": " + e.message());
1750 if (auto e = tryCreateFile(config->mapFile))
1751 error("cannot open map file " + config->mapFile + ": " + e.message());
1758 config->warnMissingEntry =
1759 (!config->entry.empty() || (!config->shared && !config->relocatable));
1760 if (config->entry.empty() && !config->relocatable)
1761 config->entry = (config->emachine == EM_MIPS) ? "__start" : "_start";
1780 config->hasDynSymTab =
1781 !sharedFiles.empty() || config->isPic || config->exportDynamic;
1789 for (StringRef arg : config->undefined)
1794 if (Symbol *sym = symtab->find(config->entry))
1802 if (Symbol *sym = symtab->find(config->init))
1804 if (Symbol *sym = symtab->find(config->fini))
1854 if (!config->relocatable)
1862 if (!config->relocatable)
1877 if (config->thinLTOIndexOnly)
1883 if (config->emitLLVM)
1909 if (config->strip == StripPolicy::None)
1928 config->andFeatures = getAndFeatures<ELFT>();
1935 config->eflags = target->calcEFlags();
1940 config->maxPageSize = getMaxPageSize(args);
1946 config->commonPageSize = getCommonPageSize(args);
1948 config->imageBase = getImageBase(args);
1950 if (config->emachine == EM_ARM) {
1954 if (config->armHasBlx == false)
1960 if (!config->relocatable)
1984 if (!config->relocatable)
2007 if (config->icf != ICFLevel::None) {
2013 if (config->callGraphProfileSort) {