reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

Declarations

tools/lld/COFF/Config.h
  231 extern Configuration *config;

References

tools/lld/COFF/Chunks.cpp
   52   live = !config->doGC || !isCOMDAT();
  103   case IMAGE_REL_AMD64_ADDR32:   add32(off, s + config->imageBase); break;
  104   case IMAGE_REL_AMD64_ADDR64:   add64(off, s + config->imageBase); break;
  124   case IMAGE_REL_I386_DIR32:    add32(off, s + config->imageBase); break;
  190   case IMAGE_REL_ARM_ADDR32:    add32(off, sx + config->imageBase); break;
  192   case IMAGE_REL_ARM_MOV32T:    applyMOV32T(off, sx + config->imageBase); break;
  302   case IMAGE_REL_ARM64_ADDR32:         add32(off, s + config->imageBase); break;
  304   case IMAGE_REL_ARM64_ADDR64:         add64(off, s + config->imageBase); break;
  324   if (fromChunk->isCodeView() || fromChunk->isDWARF() || config->mingw)
  397     switch (config->machine) {
  425   switch (config->machine) {
  499   switch (config->machine) {
  682             impSymbol->getRVA() + config->imageBase);
  692   applyMOV32T(buf, impSymbol->getRVA() + config->imageBase);
  710   assert(config->machine == ARMNT);
  715   assert(config->machine == ARMNT);
  730   assert(config->machine == ARM64);
  735   assert(config->machine == ARM64);
  745 size_t LocalImportChunk::getSize() const { return config->wordsize; }
  748   if (config->is64()) {
  749     write64le(buf, sym->getRVA() + config->imageBase);
  751     write32le(buf, sym->getRVA() + config->imageBase);
  851   switch (config->machine) {
  911 size_t AbsolutePointerChunk::getSize() const { return config->wordsize; }
  914   if (config->is64()) {
tools/lld/COFF/Chunks.h
  529     setAlignment(config->wordsize);
tools/lld/COFF/DLL.cpp
   63     setAlignment(config->wordsize);
   65   size_t getSize() const override { return config->wordsize; }
   68     if (config->is64())
   83     setAlignment(config->wordsize);
   85   size_t getSize() const override { return config->wordsize; }
   90     if (config->is64()) {
  140     return config->dllOrder[a] < config->dllOrder[b];
  140     return config->dllOrder[a] < config->dllOrder[b];
  334     write32le(buf + 1, imp->getRVA() + config->imageBase);
  354     write32le(buf + 4, desc->getRVA() + config->imageBase);
  374     applyMOV32T(buf + 0, imp->getRVA() + config->imageBase);
  394     applyMOV32T(buf + 14, desc->getRVA() + config->imageBase);
  444     setAlignment(config->wordsize);
  446   size_t getSize() const override { return config->wordsize; }
  449     if (config->is64()) {
  450       write64le(buf, thunk->getRVA() + config->imageBase);
  454       if (config->machine == ARMNT)
  456       write32le(buf, (thunk->getRVA() + config->imageBase) | bit);
  510     for (const Export &e : config->exports) {
  514       if (config->machine == ARMNT && !e.data)
  550     for (Export &e : config->exports) {
  587     lookups.push_back(make<NullChunk>(config->wordsize));
  588     addresses.push_back(make<NullChunk>(config->wordsize));
  672   switch (config->machine) {
  688   switch (config->machine) {
  704   for (Export &e : config->exports)
  707   auto *dllName = make<StringChunk>(sys::path::filename(config->outputFile));
  710   for (Export &e : config->exports)
  715   for (Export &e : config->exports) {
tools/lld/COFF/Driver.cpp
   73   config = make<Configuration>();
  107   return (sys::path::stem(path) + (config->dll ? ".dll" : ".exe")).str();
  149   assert(config->machine != IMAGE_FILE_MACHINE_UNKNOWN);
  150   if (config->machine == I386)
  320          (!config->mingw && sym.contains('@'));
  348     if (config->machine == I386 && config->mingw) {
  348     if (config->machine == I386 && config->mingw) {
  355     config->exports.push_back(exp);
  371       config->entry = addUndefined(mangle(arg->getValue()));
  383       config->noDefaultLibs.insert(doFindLib(arg->getValue()).lower());
  389       parseSubsystem(arg->getValue(), &config->subsystem,
  390                      &config->majorOSVersion, &config->minorOSVersion);
  390                      &config->majorOSVersion, &config->minorOSVersion);
  469   if (config->mingw && ret == filename)
  478   if (config->noDefaultLibAll)
  484   if (config->noDefaultLibs.count(path.lower()))
  510     config->gcroot.push_back(b);
  539   assert(config->subsystem != IMAGE_SUBSYSTEM_UNKNOWN &&
  542   if (config->mingw)
  543     return mangle(config->subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI
  547   if (config->subsystem == IMAGE_SUBSYSTEM_WINDOWS_GUI) {
  564   if (config->dll)
  566   if (config->mingw)
  589   if (config->is64())
  590     return config->dll ? 0x180000000 : 0x140000000;
  591   return config->dll ? 0x10000000 : 0x400000;
  706   StringRef outFile = config->outputFile;
  711   if (!config->implib.empty())
  712     return config->implib;
  713   SmallString<128> out = StringRef(config->outputFile);
  728   if (config->importName.empty()) {
  729     out.assign(sys::path::filename(config->outputFile));
  733     out.assign(config->importName);
  736                                    (config->dll || asLib) ? ".dll" : ".exe");
  744   for (Export &e1 : config->exports) {
  764   if (!config->incremental) {
  765     handleError(writeImportLibrary(libName, path, exports, config->machine,
  766                                    config->mingw));
  775     handleError(writeImportLibrary(libName, path, exports, config->machine,
  776                                    config->mingw));
  786   if (Error e = writeImportLibrary(libName, tmpName, exports, config->machine,
  787                                    config->mingw)) {
  806       mb->getMemBufferRef(), config->machine, config->mingw));
  806       mb->getMemBufferRef(), config->machine, config->mingw));
  808   if (config->outputFile.empty())
  809     config->outputFile = saver.save(m.OutputFile);
  810   config->importName = saver.save(m.ImportName);
  812     config->imageBase = m.ImageBase;
  814     config->stackReserve = m.StackReserve;
  816     config->stackCommit = m.StackCommit;
  818     config->heapReserve = m.HeapReserve;
  820     config->heapCommit = m.HeapCommit;
  822     config->majorImageVersion = m.MajorImageVersion;
  824     config->minorImageVersion = m.MinorImageVersion;
  826     config->majorOSVersion = m.MajorOSVersion;
  828     config->minorOSVersion = m.MinorOSVersion;
  839       config->exports.push_back(e2);
  849     config->exports.push_back(e2);
  896     if (config->machine == I386 && !isDecorated(s))
  900       if (config->warnMissingOrderSymbol)
  904       config->order[s] = INT_MIN + config->order.size();
  904       config->order[s] = INT_MIN + config->order.size();
  917   for (Export &r : config->exports)
  958       sys::path::filename(config->pdbPath, sys::path::Style::windows);
  960       sys::path::extension(config->outputFile, sys::path::Style::windows);
  997   config->pdbAltPath = buf;
 1011   if (!config->mingw &&
 1040   if (!config->dll)
 1044     if (!config->exports.empty())
 1067     config->exports.push_back(e);
 1136     config->showTiming = true;
 1138   config->showSummary = args.hasArg(OPT_summary);
 1151   config->mingw = args.hasArg(OPT_lldmingw);
 1168       config->noEntry = true;
 1186         config->warnMissingOrderSymbol = false;
 1188         config->warnDebugInfoUnusable = false;
 1190         config->warnLocallyDefinedImported = false;
 1197     config->outputFile = arg->getValue();
 1201     config->verbose = true;
 1202   errorHandler().verbose = config->verbose;
 1206     config->forceUnresolved = true;
 1210     config->forceMultiple = true;
 1214     config->forceMultipleRes = true;
 1220     config->debug = true;
 1221     config->incremental = true;
 1225   config->demangle = args.hasFlag(OPT_demangle, OPT_demangle_no);
 1228   config->debugTypes = parseDebugTypes(args);
 1235       config->pdbPath = arg->getValue();
 1237       config->pdbAltPath = arg->getValue();
 1239       config->natvisFiles = args.getAllArgValues(OPT_natvis);
 1242       config->pdbSourcePath = arg->getValue();
 1248       config->noEntry = true;
 1255     config->dll = true;
 1256     config->manifestID = 2;
 1265     config->dynamicBase = false;
 1276       config->relocatable = false;
 1277       config->dynamicBase = false;
 1282   config->appContainer =
 1287     config->machine = getMachineType(arg->getValue());
 1288     if (config->machine == IMAGE_FILE_MACHINE_UNKNOWN)
 1294     config->noDefaultLibs.insert(doFindLib(arg->getValue()).lower());
 1298     config->noDefaultLibAll = true;
 1302     parseNumbers(arg->getValue(), &config->imageBase);
 1306     parseNumbers(arg->getValue(), &config->fileAlign);
 1307     if (!isPowerOf2_64(config->fileAlign))
 1308       error("/filealign: not a power of two: " + Twine(config->fileAlign));
 1313     parseNumbers(arg->getValue(), &config->stackReserve, &config->stackCommit);
 1313     parseNumbers(arg->getValue(), &config->stackReserve, &config->stackCommit);
 1321     parseNumbers(arg->getValue(), &config->heapReserve, &config->heapCommit);
 1321     parseNumbers(arg->getValue(), &config->heapReserve, &config->heapCommit);
 1325     parseVersion(arg->getValue(), &config->majorImageVersion,
 1326                  &config->minorImageVersion);
 1330     parseSubsystem(arg->getValue(), &config->subsystem, &config->majorOSVersion,
 1330     parseSubsystem(arg->getValue(), &config->subsystem, &config->majorOSVersion,
 1331                    &config->minorOSVersion);
 1336       config->timestamp = 0;
 1337       config->repro = true;
 1339       config->repro = false;
 1341       if (value.getAsInteger(0, config->timestamp))
 1346     config->repro = false;
 1347     config->timestamp = time(nullptr);
 1360     config->implib = arg->getValue();
 1386         if (optLevel.getAsInteger(10, config->ltoo) || config->ltoo > 3)
 1386         if (optLevel.getAsInteger(10, config->ltoo) || config->ltoo > 3)
 1390         if (jobs.getAsInteger(10, config->thinLTOJobs) ||
 1391             config->thinLTOJobs == 0)
 1395         if (n.getAsInteger(10, config->ltoPartitions) ||
 1396             config->ltoPartitions == 0)
 1410   config->doGC = doGC;
 1411   config->doICF = icfLevel > 0;
 1412   config->tailMerge = (tailMerge == 1 && config->doICF) || tailMerge == 2;
 1412   config->tailMerge = (tailMerge == 1 && config->doICF) || tailMerge == 2;
 1416     config->saveTemps = true;
 1420     config->killAt = true;
 1424     config->ltoCache = arg->getValue();
 1428     config->ltoCachePolicy = CHECK(
 1448   if (config->mingw) {
 1460     parseNumbers(arg->getValue(), &config->align);
 1461     if (!isPowerOf2_64(config->align))
 1472     config->manifestDependency = arg->getValue();
 1473     config->manifest = Configuration::SideBySide;
 1479       config->manifest = Configuration::SideBySide;
 1490     config->manifestFile = arg->getValue();
 1494     config->manifestInput.push_back(arg->getValue());
 1496   if (!config->manifestInput.empty() &&
 1497       config->manifest != Configuration::Embed) {
 1501   config->thinLTOEmitImportsFiles = args.hasArg(OPT_thinlto_emit_imports_files);
 1502   config->thinLTOIndexOnly = args.hasArg(OPT_thinlto_index_only) ||
 1504   config->thinLTOIndexOnlyArg =
 1506   config->thinLTOPrefixReplace =
 1508   config->thinLTOObjectSuffixReplace =
 1510   config->ltoObjPath = args.getLastArgValue(OPT_lto_obj_path);
 1512   config->allowBind = args.hasFlag(OPT_allowbind, OPT_allowbind_no, true);
 1513   config->allowIsolation =
 1515   config->incremental =
 1517                    !config->doGC && !config->doICF && !args.hasArg(OPT_order) &&
 1517                    !config->doGC && !config->doICF && !args.hasArg(OPT_order) &&
 1519   config->integrityCheck =
 1521   config->nxCompat = args.hasFlag(OPT_nxcompat, OPT_nxcompat_no, true);
 1524   config->terminalServerAware =
 1525       !config->dll && args.hasFlag(OPT_tsaware, OPT_tsaware_no, true);
 1526   config->debugDwarf = debug == DebugKind::Dwarf;
 1527   config->debugGHashes = debug == DebugKind::GHash;
 1528   config->debugSymtab = debug == DebugKind::Symtab;
 1530   config->mapFile = getMapFile(args);
 1532   if (config->incremental && args.hasArg(OPT_profile)) {
 1534     config->incremental = false;
 1537   if (config->incremental && args.hasArg(OPT_order)) {
 1539     config->incremental = false;
 1542   if (config->incremental && config->doGC) {
 1542   if (config->incremental && config->doGC) {
 1545     config->incremental = false;
 1548   if (config->incremental && config->doICF) {
 1548   if (config->incremental && config->doICF) {
 1551     config->incremental = false;
 1612   if (config->manifest == Configuration::Embed)
 1623   if (config->machine == IMAGE_FILE_MACHINE_UNKNOWN) {
 1625     config->machine = AMD64;
 1627   config->wordsize = config->is64() ? 8 : 4;
 1627   config->wordsize = config->is64() ? 8 : 4;
 1630   if (config->machine == I386 &&
 1631       args.hasFlag(OPT_safeseh, OPT_safeseh_no, !config->mingw))
 1632     config->safeSEH = true;
 1636     parseFunctionPadMin(arg, config->machine);
 1644   config->largeAddressAware = args.hasFlag(
 1645       OPT_largeaddressaware, OPT_largeaddressaware_no, config->is64());
 1648   config->highEntropyVA =
 1649       config->is64() &&
 1652   if (!config->dynamicBase &&
 1653       (config->machine == ARMNT || config->machine == ARM64))
 1653       (config->machine == ARMNT || config->machine == ARM64))
 1655           machineToStr(config->machine));
 1660     if (config->machine == I386) {
 1666     config->exports.push_back(e);
 1685   if (config->subsystem == IMAGE_SUBSYSTEM_UNKNOWN) {
 1686     config->subsystem = inferSubsystem();
 1687     if (config->subsystem == IMAGE_SUBSYSTEM_UNKNOWN)
 1693     config->entry = addUndefined(mangle(arg->getValue()));
 1694   } else if (!config->entry && !config->noEntry) {
 1694   } else if (!config->entry && !config->noEntry) {
 1696       StringRef s = (config->machine == I386) ? "__DllMainCRTStartup@12"
 1698       config->entry = addUndefined(s);
 1705       config->entry = addUndefined(s);
 1712     config->delayLoads.insert(StringRef(arg->getValue()).lower());
 1713     if (config->machine == I386) {
 1714       config->delayLoadHelper = addUndefined("___delayLoadHelper2@8");
 1716       config->delayLoadHelper = addUndefined("__delayLoadHelper2");
 1721   if (config->outputFile.empty()) {
 1722     config->outputFile =
 1727   if (auto e = tryCreateFile(config->outputFile)) {
 1728     error("cannot open output file " + config->outputFile + ": " + e.message());
 1734     if (config->pdbPath.empty()) {
 1735       config->pdbPath = config->outputFile;
 1735       config->pdbPath = config->outputFile;
 1736       sys::path::replace_extension(config->pdbPath, ".pdb");
 1741     if (config->pdbAltPath.empty()) {
 1742       config->pdbAltPath = config->pdbPath;
 1742       config->pdbAltPath = config->pdbPath;
 1747       sys::fs::make_absolute(config->pdbAltPath);
 1748       sys::path::remove_dots(config->pdbAltPath);
 1751       parsePDBAltPath(config->pdbAltPath);
 1756   if (config->imageBase == uint64_t(-1))
 1757     config->imageBase = getDefaultImageBase();
 1760   if (config->machine == I386) {
 1775   if (config->mingw) {
 1788     if (config->entry)
 1789       mangleMaybe(config->entry);
 1792     for (Export &e : config->exports) {
 1802     for (auto pair : config->alternateNames) {
 1835   if (config->mingw) {
 1857   if (!BitcodeFile::instances.empty() && !config->forceUnresolved)
 1870   if (config->thinLTOIndexOnly)
 1882   config->hadExplicitExports = !config->exports.empty();
 1882   config->hadExplicitExports = !config->exports.empty();
 1883   if (config->mingw) {
 1908   if (!config->exports.empty() || config->dll) {
 1908   if (!config->exports.empty() || config->dll) {
 1910     if (!config->mingw || !config->implib.empty())
 1910     if (!config->mingw || !config->implib.empty())
 1920   for (auto pair : config->alignComm) {
 1941   if (config->manifest == Configuration::SideBySide)
 1951   if (config->doGC)
 1958   if (config->doICF) {
 1968   if (config->showTiming)
tools/lld/COFF/DriverUtils.cpp
  102       config->guardCF = GuardCFLevel::Off;
  104       config->guardCF = GuardCFLevel::NoLongJmp;
  106       config->guardCF = GuardCFLevel::Full;
  143   auto it = config->alternateNames.find(from);
  144   if (it != config->alternateNames.end() && it->second != to)
  146   config->alternateNames.insert(it, std::make_pair(from, to));
  160   auto pair = config->merge.insert(std::make_pair(from, to));
  207   config->section[name] = parseSectionAttributes(attrs);
  223   config->alignComm[name] = std::max(config->alignComm[name], 1 << v);
  223   config->alignComm[name] = std::max(config->alignComm[name], 1 << v);
  231     if (arg.getAsInteger(0, config->functionPadMin))
  239     config->functionPadMin = 5;
  241     config->functionPadMin = 6;
  251     config->manifest = Configuration::No;
  256   config->manifest = Configuration::Embed;
  263   if (arg.getAsInteger(0, config->manifestID))
  271     config->manifestUAC = false;
  280       std::tie(config->manifestLevel, arg) = arg.split(" ");
  285       std::tie(config->manifestUIAccess, arg) = arg.split(" ");
  299       config->swaprunCD = true;
  301       config->swaprunNet = true;
  368   if (config->manifestUAC) {
  372        << "         <requestedExecutionLevel level=" << config->manifestLevel
  373        << " uiAccess=" << config->manifestUIAccess << "/>\n"
  378   if (!config->manifestDependency.empty()) {
  381        << "      <assemblyIdentity " << config->manifestDependency << " />\n"
  398   for (StringRef filename : config->manifestInput) {
  426   for (StringRef filename : config->manifestInput) {
  441   if (config->manifestInput.empty())
  457   return WritableMemoryBuffer::getNewMemBuffer(resSize, config->outputFile +
  480   iDs->setName(config->manifestID);
  510   std::string path = config->manifestFile;
  512     path = config->outputFile + ".manifest";
  588   if (config->machine != I386)
  594   if (sym.startswith("_") && sym.contains('@') && !config->mingw)
  624   for (Export &e : config->exports) {
  631   for (Export &e : config->exports) {
  639   if (config->killAt && config->machine == I386) {
  639   if (config->killAt && config->machine == I386) {
  640     for (Export &e : config->exports) {
  649   DenseMap<StringRef, Export *> map(config->exports.size());
  651   for (Export &e : config->exports) {
  663   config->exports = std::move(v);
  666   std::sort(config->exports.begin(), config->exports.end(),
  666   std::sort(config->exports.begin(), config->exports.end(),
  675   for (Export &e : config->exports)
  677   for (Export &e : config->exports)
  689   std::pair<StringRef, InputFile *> existing = config->mustMatch[k];
  698   config->mustMatch[k] = {v, source};
  705   object::WindowsResourceParser parser(/* MinGW */ config->mingw);
  730   if (config->mingw)
  734     if (config->forceMultipleRes)
  740       llvm::object::writeWindowsResourceCOFF(config->machine, parser,
  741                                              config->timestamp);
  836   config->argv = {expandedArgv.begin(), expandedArgv.end()};
tools/lld/COFF/InputFiles.cpp
   86       if (config->mingw)
  265   if (!config->debug && name.startswith(".debug_"))
  284   else if (config->tailMerge && sec->NumberOfRelocations == 0 &&
  392     if (config->mingw && name.startswith(".weak."))
  426       if (config->mingw && prevailingComdat)
  447       else if (config->mingw)
  746   if (!config->debug)
  802   if (config->machine == I386)
  884   if (config->thinLTOIndexOnly)
  933       config->gcroot.push_back(sym);
  954   StringRef suffix = config->thinLTOObjectSuffixReplace.first;
  955   StringRef repl = config->thinLTOObjectSuffixReplace.second;
tools/lld/COFF/InputFiles.h
  331   bool live = !config->doGC;
  332   bool thunkLive = !config->doGC;
tools/lld/COFF/LTO.cpp
   59                                    config->thinLTOPrefixReplace.first,
   60                                    config->thinLTOPrefixReplace.second);
   75   if (config->machine == COFF::IMAGE_FILE_MACHINE_I386)
   81   c.OptLevel = config->ltoo;
   84   c.CGOptLevel = args::getCGOptLevel(config->ltoo);
   86   if (config->saveTemps)
   87     checkError(c.addSaveTemps(std::string(config->outputFile) + ".",
   94   if (!config->thinLTOIndexOnlyArg.empty())
   95     indexFile = openFile(config->thinLTOIndexOnlyArg);
   99   if (config->thinLTOIndexOnly) {
  102         config->thinLTOPrefixReplace.first, config->thinLTOPrefixReplace.second,
  102         config->thinLTOPrefixReplace.first, config->thinLTOPrefixReplace.second,
  103         config->thinLTOEmitImportsFiles, indexFile.get(), OnIndexWrite);
  104   } else if (config->thinLTOJobs != 0) {
  105     backend = lto::createInProcessThinBackend(config->thinLTOJobs);
  109                                        config->ltoPartitions);
  122   if (config->thinLTOIndexOnly)
  155   if (!config->ltoCache.empty())
  157         config->ltoCache, [&](size_t task, std::unique_ptr<MemoryBuffer> mb) {
  172     if (config->thinLTOEmitImportsFiles)
  179   if (config->thinLTOIndexOnly) {
  180     if (!config->ltoObjPath.empty())
  181       saveBuffer(buf[0], config->ltoObjPath);
  187   if (!config->ltoCache.empty())
  188     pruneCache(config->ltoCache, config->ltoCachePolicy);
  188     pruneCache(config->ltoCache, config->ltoCachePolicy);
  194     if (config->saveTemps) {
  196         saveBuffer(buf[i], config->outputFile + ".lto.obj");
  198         saveBuffer(buf[i], config->outputFile + Twine(i) + ".lto.obj");
tools/lld/COFF/MapFile.cpp
   91   if (config->mapFile.empty())
   95   raw_fd_ostream os(config->mapFile, ec, sys::fs::OF_None);
   97     fatal("cannot open " + config->mapFile + ": " + ec.message());
tools/lld/COFF/MarkLive.cpp
   54   for (Symbol *b : config->gcroot)
tools/lld/COFF/MinGW.cpp
   68   if (config->machine == I386) {
  157   for (Export &e : config->exports) {
tools/lld/COFF/PDB.cpp
  265   if (config->pdbSourcePath.empty()) {
  275   SmallString<128> absoluteFileName = config->pdbSourcePath;
  394   if (config->debugGHashes) {
  446   if (config->debugGHashes) {
 1175     if (!config->warnDebugInfoUnusable) {
 1311   if (!config->showSummary)
 1339   for (StringRef file : config->natvisFiles) {
 1394   cs.Machine = toCodeViewMachine(config->machine);
 1430   ArrayRef<StringRef> args = makeArrayRef(config->argv).drop_front();
 1434   if (config->pdbSourcePath.empty())
 1437     cwd = config->pdbSourcePath;
 1440   SmallString<64> exe = config->argv[0];
 1497   if (config->mingw)
 1638   dbiBuilder.setMachineType(config->machine);
 1650   nativePath = config->pdbPath;
 1687   ExitOnError exitOnErr((config->pdbPath + ": ").str());
 1689   exitOnErr(builder.commit(config->pdbPath, guid));
 1693   switch (config->machine) {
tools/lld/COFF/SymbolTable.cpp
   39   if (config->machine == IMAGE_FILE_MACHINE_UNKNOWN) {
   40     config->machine = mt;
   41   } else if (mt != IMAGE_FILE_MACHINE_UNKNOWN && config->machine != mt) {
   43           " conflicts with " + machineToStr(config->machine));
   59   if (config->forceUnresolved)
  129   if (!fileLine && config->mingw)
  293   if (refptr && refptr->getChunk()->getSize() == config->wordsize) {
  321   for (Symbol *b : config->gcroot) {
  384     if (config->mingw && impSymbol(name))
  442     if (config->mingw && handleMinGWAutomaticImport(sym, name))
  447     if (config->forceUnresolved)
  453       undefs, config->warnLocallyDefinedImported ? &localImports : nullptr,
  580   if (config->forceMultiple)
  724   if (config->machine == I386)
  763   if (config->machine != I386)
tools/lld/COFF/Symbols.cpp
   31   if (config->demangle) {
   37     if (config->machine == I386)
tools/lld/COFF/Symbols.h
  229   uint64_t getRVA() { return va - config->imageBase; }
tools/lld/COFF/TypeMerger.h
   28     if (config->debugGHashes)
   35     if (config->debugGHashes)
tools/lld/COFF/Writer.cpp
  150     return sizeof(codeview::DebugInfo) + config->pdbAltPath.size() + 1;
  160     if (!config->pdbAltPath.empty())
  161       memcpy(p, config->pdbAltPath.data(), config->pdbAltPath.size());
  161       memcpy(p, config->pdbAltPath.data(), config->pdbAltPath.size());
  162     p[config->pdbAltPath.size()] = '\0';
  323     assert(!config->debug || name.size() <= COFF::NameSize ||
  337   if (config->machine == ARMNT) {
  348   } else if (config->machine == ARM64) {
  374   switch (config->machine) {
  527   if (config->machine != ARMNT && config->machine != ARM64)
  527   if (config->machine != ARMNT && config->machine != ARM64)
  607   openFile(config->outputFile);
  608   if (config->is64()) {
  618   if (!config->pdbPath.empty() && config->debug) {
  618   if (!config->pdbPath.empty() && config->debug) {
  647         return config->order.lookup(sec->sym->getName());
  779   if (!config->mingw)
  828       if (config->verbose)
  852   if (!config->order.empty())
  922   OutputSection *debugInfoSec = config->mingw ? buildidSec : rdataSec;
  923   if (config->debug || config->repro) {
  923   if (config->debug || config->repro) {
  924     debugDirectory = make<DebugDirectoryChunk>(debugRecords, config->repro);
  928   if (config->debug) {
  941   if (config->safeSEH)
  945   if (config->guardCF != GuardCFLevel::Off)
  948   if (config->mingw) {
  968     if (config->dllOrder.count(dll) == 0)
  969       config->dllOrder[dll] = config->dllOrder.size();
  969       config->dllOrder[dll] = config->dllOrder.size();
  974     if (config->delayLoads.count(StringRef(file->dllName).lower())) {
 1004     Defined *helper = cast<Defined>(config->delayLoadHelper);
 1019     if (config->hadExplicitExports)
 1021   } else if (!config->exports.empty()) {
 1154   if (config->debugDwarf || config->debugSymtab) {
 1154   if (config->debugDwarf || config->debugSymtab) {
 1176   fileSize = alignTo(fileOff, config->fileAlign);
 1185   for (auto &p : config->merge) {
 1193       auto i = config->merge.find(toName);
 1194       if (i == config->merge.end())
 1217       config->is64() ? sizeof(pe32plus_header) : sizeof(pe32_header);
 1218   sizeOfHeaders = alignTo(sizeOfHeaders, config->fileAlign);
 1222   uint64_t rva = alignTo(sizeOfHeaders, config->align);
 1236     uint32_t padding = isCodeSection ? config->functionPadMin : 0;
 1245         rawSize = alignTo(virtualSize, config->fileAlign);
 1253     rva += alignTo(virtualSize, config->align);
 1254     fileSize += alignTo(rawSize, config->fileAlign);
 1256   sizeOfImage = alignTo(rva, config->align);
 1293   coff->Machine = config->machine;
 1296   if (config->largeAddressAware)
 1298   if (!config->is64())
 1300   if (config->dll)
 1302   if (!config->relocatable)
 1304   if (config->swaprunCD)
 1306   if (config->swaprunNet)
 1314   pe->Magic = config->is64() ? PE32Header::PE32_PLUS : PE32Header::PE32;
 1324   pe->ImageBase = config->imageBase;
 1325   pe->SectionAlignment = config->align;
 1326   pe->FileAlignment = config->fileAlign;
 1327   pe->MajorImageVersion = config->majorImageVersion;
 1328   pe->MinorImageVersion = config->minorImageVersion;
 1329   pe->MajorOperatingSystemVersion = config->majorOSVersion;
 1330   pe->MinorOperatingSystemVersion = config->minorOSVersion;
 1331   pe->MajorSubsystemVersion = config->majorOSVersion;
 1332   pe->MinorSubsystemVersion = config->minorOSVersion;
 1333   pe->Subsystem = config->subsystem;
 1336   if (!config->noEntry) {
 1337     Defined *entry = cast<Defined>(config->entry);
 1340     if (config->machine == ARMNT)
 1343   pe->SizeOfStackReserve = config->stackReserve;
 1344   pe->SizeOfStackCommit = config->stackCommit;
 1345   pe->SizeOfHeapReserve = config->heapReserve;
 1346   pe->SizeOfHeapCommit = config->heapCommit;
 1347   if (config->appContainer)
 1349   if (config->dynamicBase)
 1351   if (config->highEntropyVA)
 1353   if (!config->allowBind)
 1355   if (config->nxCompat)
 1357   if (!config->allowIsolation)
 1359   if (config->guardCF != GuardCFLevel::Off)
 1361   if (config->integrityCheck)
 1365   if (config->terminalServerAware)
 1406       dir[TLS_TABLE].Size = config->is64()
 1558       if (config->machine == I386 && reloc.Type == COFF::IMAGE_REL_I386_REL32)
 1590   if (config->entry)
 1591     maybeAddAddressTakenFunction(addressTakenSyms, config->entry);
 1594   for (Export &e : config->exports)
 1606   if (config->guardCF == GuardCFLevel::Full)
 1614   if (config->guardCF == GuardCFLevel::Full)
 1731   for (auto &p : config->section) {
 1767   if (config->debug) {
 1780   uint32_t timestamp = config->timestamp;
 1783       config->mingw && config->debug && config->pdbPath.empty();
 1783       config->mingw && config->debug && config->pdbPath.empty();
 1783       config->mingw && config->debug && config->pdbPath.empty();
 1785   if (config->repro || generateSyntheticBuildId)
 1788   if (config->repro)
 1823   if (config->machine == AMD64) {
 1830   if (config->machine == ARMNT || config->machine == ARM64) {
 1830   if (config->machine == ARMNT || config->machine == ARM64) {
 1867   if (config->verbose) {
 1893   if (!config->relocatable)