• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/lld/ELF/

Lines Matching refs:config

72 Configuration *elf::config;
100 config = make<Configuration>();
112 config->progName = args[0];
201 if (config->formatBinary) {
246 if (config->isStatic || config->relocatable) {
300 if (config->emachine == EM_MIPS && config->gnuHash)
303 if (config->fixCortexA53Errata843419 && config->emachine != EM_AARCH64)
306 if (config->fixCortexA8 && config->emachine != EM_ARM)
309 if (config->tocOptimize && config->emachine != EM_PPC64)
312 if (config->pie && config->shared)
315 if (!config->shared && !config->filterList.empty())
318 if (!config->shared && !config->auxiliaryList.empty())
321 if (!config->relocatable && !config->defineCommon)
324 if (config->strip == StripPolicy::All && config->emitRelocs)
327 if (config->zText && config->zIfuncNoplt)
330 if (config->relocatable) {
331 if (config->shared)
333 if (config->gcSections)
335 if (config->gdbIndex)
337 if (config->icf != ICFLevel::None)
339 if (config->pie)
341 if (config->exportDynamic)
345 if (config->executeOnly) {
346 if (config->emachine != EM_AARCH64)
349 if (config->singleRoRx && !script->hasSectionsCommand)
353 if (config->zRetpolineplt && config->zForceIbt)
356 if (config->emachine != EM_AARCH64) {
357 if (config->zPacPlt)
359 if (config->zForceBti)
515 if (config->timeTraceEnabled)
516 timeTraceProfilerInitialize(config->timeTraceGranularity, config->progName);
537 switch (config->ekind) {
555 if (config->timeTraceEnabled) {
557 config->outputFile)) {
606 if (config->shared)
650 config->noDynamicLinker = true;
780 if (config->warnSymbolOrdering)
803 config->callGraphProfile[std::make_pair(from, to)] += count;
820 config->callGraphProfile[{from, to}] += cgpe.cgp_weight;
859 if (!names.insert(s) && config->warnSymbolOrdering)
876 uint16_t m = config->emachine;
885 const char *argv[] = {config->progName.data(), opt.data()};
900 config->allowMultipleDefinition =
904 config->allowShlibUndefined =
907 config->auxiliaryList = args::getStrings(args, OPT_auxiliary);
908 config->bsymbolic = args.hasArg(OPT_Bsymbolic);
909 config->bsymbolicFunctions = args.hasArg(OPT_Bsymbolic_functions);
910 config->checkSections =
912 config->chroot = args.getLastArgValue(OPT_chroot);
913 config->compressDebugSections = getCompressDebugSections(args);
914 config->cref = args.hasFlag(OPT_cref, OPT_no_cref, false);
915 config->defineCommon = args.hasFlag(OPT_define_common, OPT_no_define_common,
917 config->optimizeBBJumps =
919 config->demangle = args.hasFlag(OPT_demangle, OPT_no_demangle, true);
920 config->dependentLibraries = args.hasFlag(OPT_dependent_libraries, OPT_no_dependent_libraries, true);
921 config->disableVerify = args.hasArg(OPT_disable_verify);
922 config->discard = getDiscard(args);
923 config->dwoDir = args.getLastArgValue(OPT_plugin_opt_dwo_dir_eq);
924 config->dynamicLinker = getDynamicLinker(args);
925 config->ehFrameHdr =
927 config->emitLLVM = args.hasArg(OPT_plugin_opt_emit_llvm, false);
928 config->emitRelocs = args.hasArg(OPT_emit_relocs);
929 config->callGraphProfileSort = args.hasFlag(
931 config->enableNewDtags =
933 config->entry = args.getLastArgValue(OPT_entry);
934 config->executeOnly =
936 config->exportDynamic =
938 config->filterList = args::getStrings(args, OPT_filter);
939 config->fini = args.getLastArgValue(OPT_fini, "_fini");
940 config->fixCortexA53Errata843419 = args.hasArg(OPT_fix_cortex_a53_843419) &&
942 config->fixCortexA8 =
944 config->gcSections = args.hasFlag(OPT_gc_sections, OPT_no_gc_sections, false);
945 config->gnuUnique = args.hasFlag(OPT_gnu_unique, OPT_no_gnu_unique, true);
946 config->gdbIndex = args.hasFlag(OPT_gdb_index, OPT_no_gdb_index, false);
947 config->icf = getICF(args);
948 config->ignoreDataAddressEquality =
950 config->ignoreFunctionAddressEquality =
952 config->init = args.getLastArgValue(OPT_init, "_init");
953 config->ltoAAPipeline = args.getLastArgValue(OPT_lto_aa_pipeline);
954 config->ltoCSProfileGenerate = args.hasArg(OPT_lto_cs_profile_generate);
955 config->ltoCSProfileFile = args.getLastArgValue(OPT_lto_cs_profile_file);
956 config->ltoDebugPassManager = args.hasArg(OPT_lto_debug_pass_manager);
957 config->ltoEmitAsm = args.hasArg(OPT_lto_emit_asm);
958 config->ltoNewPassManager = args.hasArg(OPT_lto_new_pass_manager);
959 config->ltoNewPmPasses = args.getLastArgValue(OPT_lto_newpm_passes);
960 config->ltoWholeProgramVisibility =
962 config->ltoo = args::getInteger(args, OPT_lto_O, 2);
963 config->ltoObjPath = args.getLastArgValue(OPT_lto_obj_path_eq);
964 config->ltoPartitions = args::getInteger(args, OPT_lto_partitions, 1);
965 config->ltoSampleProfile = args.getLastArgValue(OPT_lto_sample_profile);
966 config->ltoBasicBlockSections =
968 config->ltoUniqueBasicBlockSectionNames =
971 config->mapFile = args.getLastArgValue(OPT_Map);
972 config->mipsGotSize = args::getInteger(args, OPT_mips_got_size, 0xfff0);
973 config->mergeArmExidx =
975 config->mmapOutputFile =
977 config->nmagic = args.hasFlag(OPT_nmagic, OPT_no_nmagic, false);
978 config->noinhibitExec = args.hasArg(OPT_noinhibit_exec);
979 config->nostdlib = args.hasArg(OPT_nostdlib);
980 config->oFormatBinary = isOutputFormatBinary(args);
981 config->omagic = args.hasFlag(OPT_omagic, OPT_no_omagic, false);
982 config->optRemarksFilename = args.getLastArgValue(OPT_opt_remarks_filename);
983 config->optRemarksPasses = args.getLastArgValue(OPT_opt_remarks_passes);
984 config->optRemarksWithHotness = args.hasArg(OPT_opt_remarks_with_hotness);
985 config->optRemarksFormat = args.getLastArgValue(OPT_opt_remarks_format);
986 config->optimize = args::getInteger(args, OPT_O, 1);
987 config->orphanHandling = getOrphanHandling(args);
988 config->outputFile = args.getLastArgValue(OPT_o);
989 config->pie = args.hasFlag(OPT_pie, OPT_no_pie, false);
990 config->printIcfSections =
992 config->printGcSections =
994 config->printArchiveStats = args.getLastArgValue(OPT_print_archive_stats);
995 config->printSymbolOrder =
997 config->rpath = getRpath(args);
998 config->relocatable = args.hasArg(OPT_relocatable);
999 config->saveTemps = args.hasArg(OPT_save_temps);
1001 config->shuffleSectionSeed = args::getInteger(args, OPT_shuffle_sections, 0);
1002 config->searchPaths = args::getStrings(args, OPT_library_path);
1003 config->sectionStartMap = getSectionStartMap(args);
1004 config->shared = args.hasArg(OPT_shared);
1005 config->singleRoRx = !args.hasFlag(OPT_rosegment, OPT_no_rosegment, true);
1006 config->soName = args.getLastArgValue(OPT_soname);
1007 config->sortSection = getSortSection(args);
1008 config->splitStackAdjustSize = args::getInteger(args, OPT_split_stack_adjust_size, 16384);
1009 config->strip = getStrip(args);
1010 config->sysroot = args.getLastArgValue(OPT_sysroot);
1011 config->target1Rel = args.hasFlag(OPT_target1_rel, OPT_target1_abs, false);
1012 config->target2 = getTarget2(args);
1013 config->thinLTOCacheDir = args.getLastArgValue(OPT_thinlto_cache_dir);
1014 config->thinLTOCachePolicy = CHECK(
1017 config->thinLTOEmitImportsFiles = args.hasArg(OPT_thinlto_emit_imports_files);
1018 config->thinLTOIndexOnly = args.hasArg(OPT_thinlto_index_only) ||
1020 config->thinLTOIndexOnlyArg = args.getLastArgValue(OPT_thinlto_index_only_eq);
1021 config->thinLTOObjectSuffixReplace =
1023 config->thinLTOPrefixReplace =
1025 config->thinLTOModulesToCompile =
1027 config->timeTraceEnabled = args.hasArg(OPT_time_trace);
1028 config->timeTraceGranularity =
1030 config->trace = args.hasArg(OPT_trace);
1031 config->undefined = args::getStrings(args, OPT_undefined);
1032 config->undefinedVersion =
1034 config->unique = args.hasArg(OPT_unique);
1035 config->useAndroidRelrTags = args.hasFlag(
1037 config->unresolvedSymbols = getUnresolvedSymbolPolicy(args);
1038 config->warnBackrefs =
1040 config->warnCommon = args.hasFlag(OPT_warn_common, OPT_no_warn_common, false);
1041 config->warnIfuncTextrel =
1043 config->warnSymbolOrdering =
1045 config->zCombreloc = getZFlag(args, "combreloc", "nocombreloc", true);
1046 config->zCopyreloc = getZFlag(args, "copyreloc", "nocopyreloc", true);
1047 config->zForceBti = hasZOption(args, "force-bti");
1048 config->zForceIbt = hasZOption(args, "force-ibt");
1049 config->zGlobal = hasZOption(args, "global");
1050 config->zGnustack = getZGnuStack(args);
1051 config->zHazardplt = hasZOption(args, "hazardplt");
1052 config->zIfuncNoplt = hasZOption(args, "ifunc-noplt");
1053 config->zInitfirst = hasZOption(args, "initfirst");
1054 config->zInterpose = hasZOption(args, "interpose");
1055 config->zKeepTextSectionPrefix = getZFlag(
1057 config->zNodefaultlib = hasZOption(args, "nodefaultlib");
1058 config->zNodelete = hasZOption(args, "nodelete");
1059 config->zNodlopen = hasZOption(args, "nodlopen");
1060 config->zNow = getZFlag(args, "now", "lazy", false);
1061 config->zOrigin = hasZOption(args, "origin");
1062 config->zPacPlt = hasZOption(args, "pac-plt");
1063 config->zRelro = getZFlag(args, "relro", "norelro", true);
1064 config->zRetpolineplt = hasZOption(args, "retpolineplt");
1065 config->zRodynamic = hasZOption(args, "rodynamic");
1066 config->zSeparate = getZSeparate(args);
1067 config->zShstk = hasZOption(args, "shstk");
1068 config->zStackSize = args::getZOptionValue(args, OPT_z, "stack-size", 0);
1069 config->zStartStopVisibility = getZStartStopVisibility(args);
1070 config->zText = getZFlag(args, "text", "notext", true);
1071 config->zWxneeded = hasZOption(args, "wxneeded");
1089 config->deadRelocInNonAlloc.emplace_back(std::move(*pat), v);
1123 config->thinLTOJobs = v;
1126 config->thinLTOJobs = arg->getValue();
1128 if (config->ltoo > 3)
1129 error("invalid optimization level for LTO: " + Twine(config->ltoo));
1130 if (config->ltoPartitions == 0)
1132 if (!get_threadpool_strategy(config->thinLTOJobs))
1133 error("--thinlto-jobs: invalid job count: " + config->thinLTOJobs);
1135 if (config->splitStackAdjustSize < 0)
1149 std::tie(config->ekind, config->emachine, config->osabi) =
1151 config->mipsN32Abi =
1153 config->emulation = s;
1160 config->sysvHash = true;
1162 config->gnuHash = true;
1164 config->sysvHash = config->gnuHash = true;
1170 config->mapFile = "-";
1175 if (config->nmagic || config->omagic)
1176 config->zRelro = false;
1178 std::tie(config->buildId, config->buildIdVector) = getBuildId(args);
1180 std::tie(config->androidPackDynRelocs, config->relrPackDynRelocs) =
1188 config->symbolOrderingFile = getSymbolOrderingFile(*buffer);
1191 config->callGraphProfileSort = false;
1195 assert(config->versionDefinitions.empty());
1196 config->versionDefinitions.push_back({"local", (uint16_t)VER_NDX_LOCAL, {}});
1197 config->versionDefinitions.push_back(
1203 config->versionDefinitions[VER_NDX_LOCAL].patterns.push_back(
1207 config->versionDefinitions[VER_NDX_GLOBAL].patterns.push_back(
1214 config->warnBackrefsExclude.push_back(std::move(*pat));
1222 config->symbolic =
1232 config->dynamicList.push_back(
1250 ELFKind k = config->ekind;
1251 uint16_t m = config->emachine;
1253 config->copyRelocs = (config->relocatable || config->emitRelocs);
1254 config->is64 = (k == ELF64LEKind || k == ELF64BEKind);
1255 config->isLE = (k == ELF32LEKind || k == ELF64LEKind);
1256 config->endianness = config->isLE ? endianness::little : endianness::big;
1257 config->isMips64EL = (k == ELF64LEKind && m == EM_MIPS);
1258 config->isPic = config->pie || config->shared;
1259 config->picThunk = args.hasArg(OPT_pic_veneer, config->isPic);
1260 config->wordsize = config->is64 ? 8 : 4;
1276 config->isRela = getIsRela(args);
1283 config->writeAddends = args.hasFlag(OPT_apply_dynamic_relocs,
1285 !config->isRela;
1287 config->tocOptimize =
1334 config->asNeeded = true;
1337 config->formatBinary = isFormatBinary(arg->getValue());
1340 config->asNeeded = false;
1345 config->isStatic = true;
1348 config->isStatic = false;
1389 stack.emplace_back(config->asNeeded, config->isStatic, inWholeArchive);
1396 std::tie(config->asNeeded, config->isStatic, inWholeArchive) = stack.back();
1408 if (config->ekind != ELFNoneKind)
1414 config->ekind = f->ekind;
1415 config->emachine = f->emachine;
1416 config->osabi = f->osabi;
1417 config->mipsN32Abi = config->emachine == EM_MIPS && isMipsN32Abi(f);
1430 if (config->nmagic || config->omagic) {
1445 if (config->nmagic || config->omagic) {
1451 if (val > config->maxPageSize)
1452 val = config->maxPageSize;
1470 if ((v % config->maxPageSize) != 0)
1608 if (config->icf == ICFLevel::Safe || !(d->section->flags & SHF_EXECINSTR))
1629 if (config->icf == ICFLevel::All && config->ignoreDataAddressEquality)
1696 if (!config->sectionStartMap.empty())
1699 if (config->emachine == EM_MIPS)
1744 if (!config->relocatable)
1833 if (config->emachine != EM_386 && config->emachine != EM_X86_64 &&
1834 config->emachine != EM_AARCH64)
1840 if (config->zForceBti && !(features & GNU_PROPERTY_AARCH64_FEATURE_1_BTI)) {
1844 } else if (config->zForceIbt &&
1850 if (config->zPacPlt && !(features & GNU_PROPERTY_AARCH64_FEATURE_1_PAC)) {
1859 if (config->zShstk)
1872 if (config->emachine == EM_MIPS)
1873 config->sysvHash = true;
1875 config->sysvHash = config->gnuHash = true;
1879 if (config->outputFile.empty())
1880 config->outputFile = "a.out";
1885 if (auto e = tryCreateFile(config->outputFile))
1886 error("cannot open output file " + config->outputFile + ": " + e.message());
1887 if (auto e = tryCreateFile(config->mapFile))
1888 error("cannot open map file " + config->mapFile + ": " + e.message());
1895 config->warnMissingEntry =
1896 (!config->entry.empty() || (!config->shared && !config->relocatable));
1897 if (config->entry.empty() && !config->relocatable)
1898 config->entry = (config->emachine == EM_MIPS) ? "__start" : "_start";
1906 for (StringRef name : config->undefined)
1925 config->hasDynSymTab =
1926 !sharedFiles.empty() || config->isPic || config->exportDynamic;
1934 for (StringRef name : config->undefined)
1939 if (Symbol *sym = symtab->find(config->entry))
1947 if (Symbol *sym = dyn_cast_or_null<Defined>(symtab->find(config->init)))
1949 if (Symbol *sym = dyn_cast_or_null<Defined>(symtab->find(config->fini)))
1995 if (!config->relocatable)
2003 if (!config->relocatable)
2026 if (config->thinLTOIndexOnly || config->emitLLVM || config->ltoEmitAsm ||
2027 !config->thinLTOModulesToCompile.empty())
2053 if (config->strip == StripPolicy::None)
2072 config->andFeatures = getAndFeatures<ELFT>();
2079 config->eflags = target->calcEFlags();
2084 config->maxPageSize = getMaxPageSize(args);
2090 config->commonPageSize = getCommonPageSize(args);
2092 config->imageBase = getImageBase(args);
2094 if (config->emachine == EM_ARM) {
2098 if (config->armHasBlx == false)
2104 if (!config->relocatable)
2128 if (!config->relocatable)
2151 if (config->icf != ICFLevel::None) {
2157 if (config->callGraphProfileSort) {